Skip to content

Commit fa42299

Browse files
author
MarcoFalke
committed
Remove nullptr check in GetBlockScriptFlags
Commit d59b8d6 removed the need for this check and it was never needed.
1 parent faadc60 commit fa42299

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/validation.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,8 +1589,7 @@ static unsigned int GetBlockScriptFlags(const CBlockIndex& block_index, const Co
15891589
// mainnet and testnet), so for simplicity, always leave P2SH
15901590
// on except for the one violating block.
15911591
if (consensusparams.BIP16Exception.IsNull() || // no bip16 exception on this chain
1592-
block_index.phashBlock == nullptr || // this is a new candidate block, eg from TestBlockValidity()
1593-
*block_index.phashBlock != consensusparams.BIP16Exception) // this block isn't the historical exception
1592+
*Assert(block_index.phashBlock) != consensusparams.BIP16Exception) // this block isn't the historical exception
15941593
{
15951594
// Enforce WITNESS rules whenever P2SH is in effect
15961595
flags |= SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS;

0 commit comments

Comments
 (0)