diff options
author | Alex Morcos <morcos@chaincode.com> | 2017-02-15 15:48:48 -0500 |
---|---|---|
committer | Alex Morcos <morcos@chaincode.com> | 2017-04-10 13:56:50 -0400 |
commit | 5ba81e54e0390ec0be7dbc8ebea0c35933442a8a (patch) | |
tree | 614058d4426ef86d836b017db769327402706ea0 /src/txmempool.cpp | |
parent | 14e10aa842b8583f9648accd5d151dbdf342b9dc (diff) |
Read and Write fee estimate file directly from CBlockPolicyEstimator
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r-- | src/txmempool.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index fa05841491..ac842da6bf 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -5,7 +5,6 @@ #include "txmempool.h" -#include "clientversion.h" #include "consensus/consensus.h" #include "consensus/validation.h" #include "validation.h" @@ -16,7 +15,6 @@ #include "util.h" #include "utilmoneystr.h" #include "utiltime.h" -#include "version.h" CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef& _tx, const CAmount& _nFee, int64_t _nTime, unsigned int _entryHeight, @@ -843,38 +841,6 @@ TxMempoolInfo CTxMemPool::info(const uint256& hash) const return GetInfo(i); } -bool -CTxMemPool::WriteFeeEstimates(CAutoFile& fileout) const -{ - try { - fileout << 139900; // version required to read: 0.13.99 or later - fileout << CLIENT_VERSION; // version that wrote the file - minerPolicyEstimator->Write(fileout); - } - catch (const std::exception&) { - LogPrintf("CTxMemPool::WriteFeeEstimates(): unable to write policy estimator data (non-fatal)\n"); - return false; - } - return true; -} - -bool -CTxMemPool::ReadFeeEstimates(CAutoFile& filein) -{ - try { - int nVersionRequired, nVersionThatWrote; - filein >> nVersionRequired >> nVersionThatWrote; - if (nVersionRequired > CLIENT_VERSION) - return error("CTxMemPool::ReadFeeEstimates(): up-version (%d) fee estimate file", nVersionRequired); - minerPolicyEstimator->Read(filein, nVersionThatWrote); - } - catch (const std::exception&) { - LogPrintf("CTxMemPool::ReadFeeEstimates(): unable to read policy estimator data (non-fatal)\n"); - return false; - } - return true; -} - void CTxMemPool::PrioritiseTransaction(const uint256& hash, const CAmount& nFeeDelta) { { |