Skip to content

Commit

Permalink
trivial: Enforce NULLDUMMY simultaneously with CHECKLOCKTIMEVERIFY
Browse files Browse the repository at this point in the history
  • Loading branch information
lateminer committed Sep 20, 2024
1 parent 2bc7b01 commit e1d41b1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2129,9 +2129,10 @@ static unsigned int GetBlockScriptFlags(const CBlockIndex& block_index, const Ch
flags |= SCRIPT_VERIFY_WITNESS;
}

// Enforce CHECKLOCKTIMEVERIFY (BIP65)
// Enforce CHECKLOCKTIMEVERIFY (BIP65) and BIP147 NULLDUMMY
if (consensusparams.IsProtocolV3(block_index.GetBlockTime())) {
flags |= SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY;
flags |= SCRIPT_VERIFY_NULLDUMMY;
}

// Enforce CHECKSEQUENCEVERIFY (BIP112)
Expand All @@ -2144,11 +2145,6 @@ static unsigned int GetBlockScriptFlags(const CBlockIndex& block_index, const Ch
flags |= SCRIPT_VERIFY_TAPROOT;
}

// Enforce BIP147 NULLDUMMY (activated simultaneously with CLTV)
if (consensusparams.IsProtocolV3(block_index.GetBlockTime())) {
flags |= SCRIPT_VERIFY_NULLDUMMY;
}

return flags;
}

Expand Down

0 comments on commit e1d41b1

Please sign in to comment.