@@ -944,32 +944,9 @@ bool CBlockPolicyEstimator::Read(CAutoFile& filein)
944
944
unsigned int nFileBestSeenHeight;
945
945
filein >> nFileBestSeenHeight;
946
946
947
- if (nVersionThatWrote < 149900 ) {
948
- // Read the old fee estimates file for temporary use, but then discard. Will start collecting data from scratch.
949
- // decay is stored before buckets in old versions, so pre-read decay and pass into TxConfirmStats constructor
950
- double tempDecay;
951
- filein >> tempDecay;
952
- if (tempDecay <= 0 || tempDecay >= 1 )
953
- throw std::runtime_error (" Corrupt estimates file. Decay must be between 0 and 1 (non-inclusive)" );
954
-
955
- std::vector<double > tempBuckets;
956
- filein >> tempBuckets;
957
- size_t tempNum = tempBuckets.size ();
958
- if (tempNum <= 1 || tempNum > 1000 )
959
- throw std::runtime_error (" Corrupt estimates file. Must have between 2 and 1000 feerate buckets" );
960
-
961
- std::map<double , unsigned int > tempMap;
962
-
963
- std::unique_ptr<TxConfirmStats> tempFeeStats (new TxConfirmStats (tempBuckets, tempMap, MED_BLOCK_PERIODS, tempDecay, 1 ));
964
- tempFeeStats->Read (filein, nVersionThatWrote, tempNum);
965
- // if nVersionThatWrote < 139900 then another TxConfirmStats (for priority) follows but can be ignored.
966
-
967
- tempMap.clear ();
968
- for (unsigned int i = 0 ; i < tempBuckets.size (); i++) {
969
- tempMap[tempBuckets[i]] = i;
970
- }
971
- }
972
- else { // nVersionThatWrote >= 149900
947
+ if (nVersionRequired < 149900 ) {
948
+ LogPrintf (" %s: incompatible old fee estimation data (non-fatal). Version: %d\n " , __func__, nVersionRequired);
949
+ } else { // New format introduced in 149900
973
950
unsigned int nFileHistoricalFirst, nFileHistoricalBest;
974
951
filein >> nFileHistoricalFirst >> nFileHistoricalBest;
975
952
if (nFileHistoricalFirst > nFileHistoricalBest || nFileHistoricalBest > nFileBestSeenHeight) {
0 commit comments