mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
[consensus] Pin P2SH activation to block 173805 on mainnet
This commit is contained in:
parent
526023aa7a
commit
18e071841e
4 changed files with 28 additions and 21 deletions
|
|
@ -1590,11 +1590,12 @@ static ThresholdConditionCache warningcache[VERSIONBITS_NUM_BITS];
|
|||
static unsigned int GetBlockScriptFlags(const CBlockIndex* pindex, const Consensus::Params& consensusparams) {
|
||||
AssertLockHeld(cs_main);
|
||||
|
||||
// BIP16 didn't become active until Apr 1 2012
|
||||
int64_t nBIP16SwitchTime = 1333238400;
|
||||
bool fStrictPayToScriptHash = (pindex->GetBlockTime() >= nBIP16SwitchTime);
|
||||
unsigned int flags = SCRIPT_VERIFY_NONE;
|
||||
|
||||
unsigned int flags = fStrictPayToScriptHash ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE;
|
||||
// Start enforcing P2SH (BIP16)
|
||||
if (pindex->nHeight >= consensusparams.BIP16Height) {
|
||||
flags |= SCRIPT_VERIFY_P2SH;
|
||||
}
|
||||
|
||||
// Start enforcing the DERSIG (BIP66) rule
|
||||
if (pindex->nHeight >= consensusparams.BIP66Height) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue