aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-07-28 09:50:46 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-07-28 09:51:04 +0200
commit64d660a43fb8ced837b313791b7cddd27b1e7761 (patch)
tree8022e555f140905397ac9817924827ae4bc0327d
parentc24b50ec168eb867129244a14ee5b44f90fb6be3 (diff)
parent38c4c8b7012ceeee3b6591d6a80b5f13ee20fbd6 (diff)
Merge #8348: Trivial: Segwit: Don't call IsWitnessEnabled from ContextualCheckBlock
38c4c8b Trivial: Segwit: Don't call IsWitnessEnabled from ContextualCheckBlock (Jorge Timón)
-rw-r--r--src/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 052b739326..8dd703b687 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3567,7 +3567,7 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, const CB
// {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;