Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 709 Lines • ▼ Show 20 Lines | for (const CTxIn &txin : tx.vin) { | ||||
// Set extraFlags as a set of flags that needs to be activated. | // Set extraFlags as a set of flags that needs to be activated. | ||||
uint32_t extraFlags = SCRIPT_VERIFY_NONE; | uint32_t extraFlags = SCRIPT_VERIFY_NONE; | ||||
if (IsReplayProtectionEnabledForCurrentBlock(config)) { | if (IsReplayProtectionEnabledForCurrentBlock(config)) { | ||||
extraFlags |= SCRIPT_ENABLE_REPLAY_PROTECTION; | extraFlags |= SCRIPT_ENABLE_REPLAY_PROTECTION; | ||||
} | } | ||||
if (IsMagneticAnomalyEnabledForCurrentBlock(config)) { | if (IsMagneticAnomalyEnabledForCurrentBlock(config)) { | ||||
extraFlags |= SCRIPT_ENABLE_CHECKDATASIG; | extraFlags |= SCRIPT_VERIFY_CHECKDATASIG_SIGOPS; | ||||
} | } | ||||
if (IsGreatWallEnabledForCurrentBlock(config)) { | if (IsGreatWallEnabledForCurrentBlock(config)) { | ||||
if (!fRequireStandard) { | if (!fRequireStandard) { | ||||
extraFlags |= SCRIPT_ALLOW_SEGWIT_RECOVERY; | extraFlags |= SCRIPT_ALLOW_SEGWIT_RECOVERY; | ||||
} | } | ||||
extraFlags |= SCRIPT_ENABLE_SCHNORR; | extraFlags |= SCRIPT_ENABLE_SCHNORR; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 928 Lines • ▼ Show 20 Lines | if (IsDAAEnabled(config, pChainTip)) { | ||||
flags |= SCRIPT_VERIFY_NULLFAIL; | flags |= SCRIPT_VERIFY_NULLFAIL; | ||||
} | } | ||||
// When the magnetic anomaly fork is enabled, we start accepting | // When the magnetic anomaly fork is enabled, we start accepting | ||||
// transactions using the OP_CHECKDATASIG opcode and it's verify | // transactions using the OP_CHECKDATASIG opcode and it's verify | ||||
// alternative. We also start enforcing push only signatures and | // alternative. We also start enforcing push only signatures and | ||||
// clean stack. | // clean stack. | ||||
if (IsMagneticAnomalyEnabled(config, pChainTip)) { | if (IsMagneticAnomalyEnabled(config, pChainTip)) { | ||||
flags |= SCRIPT_ENABLE_CHECKDATASIG; | flags |= SCRIPT_VERIFY_CHECKDATASIG_SIGOPS; | ||||
flags |= SCRIPT_VERIFY_SIGPUSHONLY; | flags |= SCRIPT_VERIFY_SIGPUSHONLY; | ||||
flags |= SCRIPT_VERIFY_CLEANSTACK; | flags |= SCRIPT_VERIFY_CLEANSTACK; | ||||
} | } | ||||
// If the Great Wall fork is enabled, we start accepting transactions | // If the Great Wall fork is enabled, we start accepting transactions | ||||
// recovering coins sent to segwit addresses. We also start accepting | // recovering coins sent to segwit addresses. We also start accepting | ||||
// 65/64-byte Schnorr signatures in CHECKSIG and CHECKDATASIG respectively, | // 65/64-byte Schnorr signatures in CHECKSIG and CHECKDATASIG respectively, | ||||
// and their verify variants. We also stop accepting 65 byte signatures in | // and their verify variants. We also stop accepting 65 byte signatures in | ||||
▲ Show 20 Lines • Show All 4,037 Lines • Show Last 20 Lines |