Strict DER signatures are always enforced; remove the flag and code that used it.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood
2017-05-07 19:46:41 +01:00
parent 3c985d26ce
commit de609b8c54
9 changed files with 57 additions and 230 deletions

View File

@@ -2078,19 +2078,9 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
REJECT_INVALID, "bad-txns-BIP30");
}
unsigned int flags = SCRIPT_VERIFY_P2SH;
unsigned int flags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY;
// Start enforcing the DERSIG (BIP66) rules, for block.nVersion=3 blocks,
// when 75% of the network has upgraded:
if (block.nVersion >= 3) {
flags |= SCRIPT_VERIFY_DERSIG;
}
// Start enforcing CHECKLOCKTIMEVERIFY, (BIP65) for block.nVersion=4
// blocks, when 75% of the network has upgraded:
if (block.nVersion >= 4) {
flags |= SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY;
}
// DERSIG (BIP66) is also always enforced, but does not have a flag.
CBlockUndo blockundo;