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/miner.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/miner.h')
| -rw-r--r-- | src/miner.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/miner.h b/src/miner.h index b3be7e52e..2bc98fd38 100644 --- a/src/miner.h +++ b/src/miner.h @@ -73,7 +73,7 @@ struct modifiedentry_iter { // except operating on CTxMemPoolModifiedEntry. // TODO: refactor to avoid duplication of this logic. struct CompareModifiedEntry { - bool operator()(const CTxMemPoolModifiedEntry &a, const CTxMemPoolModifiedEntry &b) + bool operator()(const CTxMemPoolModifiedEntry &a, const CTxMemPoolModifiedEntry &b) const { double f1 = (double)a.nModFeesWithAncestors * b.nSizeWithAncestors; double f2 = (double)b.nModFeesWithAncestors * a.nSizeWithAncestors; @@ -88,7 +88,7 @@ struct CompareModifiedEntry { // This is sufficient to sort an ancestor package in an order that is valid // to appear in a block. struct CompareTxIterByAncestorCount { - bool operator()(const CTxMemPool::txiter &a, const CTxMemPool::txiter &b) + bool operator()(const CTxMemPool::txiter &a, const CTxMemPool::txiter &b) const { if (a->GetCountWithAncestors() != b->GetCountWithAncestors()) return a->GetCountWithAncestors() < b->GetCountWithAncestors(); @@ -214,3 +214,4 @@ void IncrementExtraNonce(CBlock* pblock, const CBlockIndex* pindexPrev, unsigned int64_t UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev); #endif // BITCOIN_MINER_H + |