diff options
Diffstat (limited to 'src/validation.cpp')
| -rw-r--r-- | src/validation.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index c5f00fe13..c21c78467 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -44,6 +44,7 @@ #include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/join.hpp> +#include <boost/bind/bind.hpp> #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp> #include <boost/math/distributions/poisson.hpp> @@ -179,7 +180,9 @@ private: public: MemPoolConflictRemovalTracker(CTxMemPool &_pool) : pool(_pool) { - pool.NotifyEntryRemoved.connect(boost::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved, this, _1, _2)); + pool.NotifyEntryRemoved.connect(boost::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved, + this, boost::placeholders::_1, + boost::placeholders::_2)); } void NotifyEntryRemoved(CTransactionRef txRemoved, MemPoolRemovalReason reason) { @@ -189,7 +192,9 @@ public: } ~MemPoolConflictRemovalTracker() { - pool.NotifyEntryRemoved.disconnect(boost::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved, this, _1, _2)); + pool.NotifyEntryRemoved.disconnect(boost::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved, + this, boost::placeholders::_1, + boost::placeholders::_2)); for (const auto& tx : conflictedTxs) { GetMainSignals().SyncTransaction(*tx, NULL, CMainSignals::SYNC_TRANSACTION_NOT_IN_BLOCK); } @@ -1852,9 +1857,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin flags |= SCRIPT_VERIFY_DERSIG; } - // Start enforcing CHECKLOCKTIMEVERIFY, (BIP65) for block.nVersion=4 - // blocks, when 75% of the network has upgraded: - if (block.GetBaseVersion() >= 4 && IsSuperMajority(4, pindex->pprev, chainparams.GetConsensus(0).nMajorityEnforceBlockUpgrade, chainparams.GetConsensus(0))) { + // Start enforcing CHECKLOCKTIMEVERIFY, (BIP65) for block.nVersion=4 blocks + if (pindex->nHeight >= chainparams.GetConsensus(0).BIP65Height) { flags |= SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY; } @@ -3035,15 +3039,11 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta // Reject outdated version blocks when 95% (75% on testnet) of the network has upgraded: // check for version 2, 3 and 4 upgrades // Dogecoin: Version 2 enforcement was never used - if((block.GetBaseVersion() < 3 && nHeight >= consensusParams.BIP66Height)) + if((block.GetBaseVersion() < 3 && nHeight >= consensusParams.BIP66Height) || + (block.GetBaseVersion() < 4 && nHeight >= consensusParams.BIP65Height)) return state.Invalid(false, REJECT_OBSOLETE, strprintf("bad-version(0x%08x)", block.GetBaseVersion()), strprintf("rejected nVersion=0x%08x block", block.GetBaseVersion())); - // Dogecoin: Introduce supermajority rules for v4 blocks - if (block.GetBaseVersion() < 4 && IsSuperMajority(4, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams)) - return state.Invalid(error("%s : rejected nVersion=3 block", __func__), - REJECT_OBSOLETE, "bad-version"); - return true; } |