mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-11 13:13:49 +01:00
Remove nullptr check in GetBlockScriptFlags
Commit d59b8d6aa1 removed the need for
this check and it was never needed.
This commit is contained in:
@@ -1589,8 +1589,7 @@ static unsigned int GetBlockScriptFlags(const CBlockIndex& block_index, const Co
|
|||||||
// mainnet and testnet), so for simplicity, always leave P2SH
|
// mainnet and testnet), so for simplicity, always leave P2SH
|
||||||
// on except for the one violating block.
|
// on except for the one violating block.
|
||||||
if (consensusparams.BIP16Exception.IsNull() || // no bip16 exception on this chain
|
if (consensusparams.BIP16Exception.IsNull() || // no bip16 exception on this chain
|
||||||
block_index.phashBlock == nullptr || // this is a new candidate block, eg from TestBlockValidity()
|
*Assert(block_index.phashBlock) != consensusparams.BIP16Exception) // this block isn't the historical exception
|
||||||
*block_index.phashBlock != consensusparams.BIP16Exception) // this block isn't the historical exception
|
|
||||||
{
|
{
|
||||||
// Enforce WITNESS rules whenever P2SH is in effect
|
// Enforce WITNESS rules whenever P2SH is in effect
|
||||||
flags |= SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS;
|
flags |= SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS;
|
||||||
|
|||||||
Reference in New Issue
Block a user