Skip to content

Commit

Permalink
#73 Devcoin blockchain has no BIP16 exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
develCuy committed Jan 30, 2022
1 parent 18f23de commit e016385
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/validation.cpp
Expand Up @@ -1688,14 +1688,12 @@ static unsigned int GetBlockScriptFlags(const CBlockIndex* pindex, const Consens
{
unsigned int flags = SCRIPT_VERIFY_NONE;

// BIP16 didn't become active until Apr 1 2012 (on mainnet, and
// retroactively applied to testnet)
// However, only one historical block violated the P2SH rules (on both
// mainnet and testnet), so for simplicity, always leave P2SH
// on except for the one violating block.
// BIP16 didn't become active on Bitcoin until Apr 1 2012 (on mainnet, and
// retroactively applied to their testnet)
// However, no Devcoin historical block violated the P2SH rules (on both
// mainnet and testnet), so for simplicity, always leave P2SH on
if (consensusparams.BIP16Exception.IsNull() || // no bip16 exception on this chain
pindex->phashBlock == nullptr || // this is a new candidate block, eg from TestBlockValidity()
*pindex->phashBlock != consensusparams.BIP16Exception) // this block isn't the historical exception
pindex->phashBlock == nullptr) // this is a new candidate block, eg from TestBlockValidity()
{
flags |= SCRIPT_VERIFY_P2SH;
}
Expand Down

0 comments on commit e016385

Please sign in to comment.