diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2016-02-20 23:37:13 +0100 |
---|---|---|
committer | BtcDrak <btcdrak@gmail.com> | 2016-03-18 08:09:06 +0000 |
commit | 65751a3cf2421a9419172949cad9dc49b7383551 (patch) | |
tree | d6629a99099ed077b2a86f131ac5f3206f494d79 /src/main.cpp | |
parent | 73b7eb501e6498e911321131e58ae7fbec6bc5ed (diff) |
Add CHECKSEQUENCEVERIFY softfork through BIP9
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 1bc88326b6..cfa69817b6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2262,6 +2262,11 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin flags |= SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY; } + // Start enforcing CHECKSEQUENCEVERIFY using versionbits logic. + if (VersionBitsState(pindex->pprev, chainparams.GetConsensus(), Consensus::DEPLOYMENT_CSV, versionbitscache) == THRESHOLD_ACTIVE) { + flags |= SCRIPT_VERIFY_CHECKSEQUENCEVERIFY; + } + int64_t nTime2 = GetTimeMicros(); nTimeForks += nTime2 - nTime1; LogPrint("bench", " - Fork checks: %.2fms [%.2fs]\n", 0.001 * (nTime2 - nTime1), nTimeForks * 0.000001); |