diff options
| author | Michi Lumin <[email protected]> | 2018-05-21 17:09:45 -0600 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2019-03-25 05:36:12 +0000 |
| commit | d84837a83869e7f435c2968adf055f517dc27d9a (patch) | |
| tree | 4b9c2cc6eac88752a0a9cf192d54f4de264e307b /src/txmempool.h | |
| parent | Fix Mac cross builds (diff) | |
| download | discoin-d84837a83869e7f435c2968adf055f517dc27d9a.tar.xz discoin-d84837a83869e7f435c2968adf055f517dc27d9a.zip | |
Cherry-pick from Bitcoin repo, 1ec0c0a: small changes for OSX build
Cherry-pick from Bitcoin repo, 1ec0c0a: adds "const" suffix to several lines in txmempool.h and miner.h to make this build succeed under OSX w. clang++ and Boost lib 1.66+
Diffstat (limited to 'src/txmempool.h')
| -rw-r--r-- | src/txmempool.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/txmempool.h b/src/txmempool.h index 12c9e59f5..79209759f 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -229,7 +229,7 @@ struct mempoolentry_txid class CompareTxMemPoolEntryByDescendantScore { public: - bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) + bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const { bool fUseADescendants = UseDescendantScore(a); bool fUseBDescendants = UseDescendantScore(b); @@ -251,7 +251,7 @@ public: } // Calculate which score to use for an entry (avoiding division). - bool UseDescendantScore(const CTxMemPoolEntry &a) + bool UseDescendantScore(const CTxMemPoolEntry &a) const { double f1 = (double)a.GetModifiedFee() * a.GetSizeWithDescendants(); double f2 = (double)a.GetModFeesWithDescendants() * a.GetTxSize(); @@ -266,7 +266,7 @@ public: class CompareTxMemPoolEntryByScore { public: - bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) + bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const { double f1 = (double)a.GetModifiedFee() * b.GetTxSize(); double f2 = (double)b.GetModifiedFee() * a.GetTxSize(); @@ -280,7 +280,7 @@ public: class CompareTxMemPoolEntryByEntryTime { public: - bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) + bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const { return a.GetTime() < b.GetTime(); } @@ -289,7 +289,7 @@ public: class CompareTxMemPoolEntryByAncestorFee { public: - bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) + bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const { double aFees = a.GetModFeesWithAncestors(); double aSize = a.GetSizeWithAncestors(); @@ -656,7 +656,7 @@ public: /** Estimate priority needed to get into the next nBlocks */ double estimatePriority(int nBlocks) const; - + /** Write/Read estimates to disk */ bool WriteFeeEstimates(CAutoFile& fileout) const; bool ReadFeeEstimates(CAutoFile& filein); @@ -705,7 +705,7 @@ private: void removeUnchecked(txiter entry, MemPoolRemovalReason reason = MemPoolRemovalReason::UNKNOWN); }; -/** +/** * CCoinsView that brings transactions from a memorypool into view. * It does not check for spendings by memory pool transactions. */ @@ -734,3 +734,5 @@ struct TxCoinAgePriorityCompare }; #endif // BITCOIN_TXMEMPOOL_H + + |