aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-02-20 23:37:13 +0100
committerBtcDrak <btcdrak@gmail.com>2016-03-18 09:28:40 +0000
commitee40924fef1e8835b9ef865360b126952ad8359d (patch)
tree44eed691af008d103ad510a8f6b9f50295313ebe /src/main.cpp
parent6ff0b9f96ef83dc11f70e1ab66d815fb6c971e60 (diff)
Add CHECKSEQUENCEVERIFY softfork through BIP9
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 89ca99bc90..39d68af372 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2277,6 +2277,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);