diff options
| author | Pieter Wuille <[email protected]> | 2016-02-20 23:37:13 +0100 |
|---|---|---|
| committer | BtcDrak <[email protected]> | 2016-03-18 08:09:06 +0000 |
| commit | 65751a3cf2421a9419172949cad9dc49b7383551 (patch) | |
| tree | d6629a99099ed077b2a86f131ac5f3206f494d79 /src/main.cpp | |
| parent | Merge #7575: Minimal BIP9 implementation (diff) | |
| download | discoin-65751a3cf2421a9419172949cad9dc49b7383551.tar.xz discoin-65751a3cf2421a9419172949cad9dc49b7383551.zip | |
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 1bc88326b..cfa69817b 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); |