aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJorge Timón <jtimon@jtimon.cc>2016-07-17 02:34:06 +0200
committerJorge Timón <jtimon@jtimon.cc>2016-07-17 02:41:58 +0200
commit38c4c8b7012ceeee3b6591d6a80b5f13ee20fbd6 (patch)
tree2298a5c362e41591b15c1603a5373019e99ea82e /src
parentbc94b87487824c6fba45788facf96faba97a4aa6 (diff)
Trivial: Segwit: Don't call IsWitnessEnabled from ContextualCheckBlock
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 62f1cd1517..21092ca2db 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3564,7 +3564,7 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIn
// {0xaa, 0x21, 0xa9, 0xed}, and the following 32 bytes are SHA256^2(witness root, witness nonce). In case there are
// multiple, the last one is used.
bool fHaveWitness = false;
- if (IsWitnessEnabled(pindexPrev, consensusParams)) {
+ if (VersionBitsState(pindexPrev, consensusParams, Consensus::DEPLOYMENT_SEGWIT, versionbitscache) == THRESHOLD_ACTIVE) {
int commitpos = GetWitnessCommitmentIndex(block);
if (commitpos != -1) {
bool malleated = false;