Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 745 Lines • ▼ Show 20 Lines | for (const CTxIn &txin : tx.vin) { | ||||
} | } | ||||
if (IsMagneticAnomalyEnabledForCurrentBlock(config)) { | if (IsMagneticAnomalyEnabledForCurrentBlock(config)) { | ||||
extraFlags |= SCRIPT_VERIFY_CHECKDATASIG_SIGOPS; | extraFlags |= SCRIPT_VERIFY_CHECKDATASIG_SIGOPS; | ||||
} | } | ||||
if (IsGravitonEnabledForCurrentBlock(config)) { | if (IsGravitonEnabledForCurrentBlock(config)) { | ||||
extraFlags |= SCRIPT_ENABLE_SCHNORR_MULTISIG; | extraFlags |= SCRIPT_ENABLE_SCHNORR_MULTISIG; | ||||
extraFlags |= SCRIPT_VERIFY_MINIMALDATA; | |||||
} | } | ||||
// Make sure whatever we need to activate is actually activated. | // Make sure whatever we need to activate is actually activated. | ||||
const uint32_t scriptVerifyFlags = | const uint32_t scriptVerifyFlags = | ||||
STANDARD_SCRIPT_VERIFY_FLAGS | extraFlags; | STANDARD_SCRIPT_VERIFY_FLAGS | extraFlags; | ||||
// Check against previous transactions. This is done last to help | // Check against previous transactions. This is done last to help | ||||
// prevent CPU exhaustion denial-of-service attacks. | // prevent CPU exhaustion denial-of-service attacks. | ||||
▲ Show 20 Lines • Show All 862 Lines • ▼ Show 20 Lines | static uint32_t GetNextBlockScriptFlags(const Config &config, | ||||
if (IsMagneticAnomalyEnabled(config, pindex)) { | if (IsMagneticAnomalyEnabled(config, pindex)) { | ||||
flags |= SCRIPT_VERIFY_CHECKDATASIG_SIGOPS; | flags |= SCRIPT_VERIFY_CHECKDATASIG_SIGOPS; | ||||
flags |= SCRIPT_VERIFY_SIGPUSHONLY; | flags |= SCRIPT_VERIFY_SIGPUSHONLY; | ||||
flags |= SCRIPT_VERIFY_CLEANSTACK; | flags |= SCRIPT_VERIFY_CLEANSTACK; | ||||
} | } | ||||
if (IsGravitonEnabled(config, pindex)) { | if (IsGravitonEnabled(config, pindex)) { | ||||
flags |= SCRIPT_ENABLE_SCHNORR_MULTISIG; | flags |= SCRIPT_ENABLE_SCHNORR_MULTISIG; | ||||
flags |= SCRIPT_VERIFY_MINIMALDATA; | |||||
} | } | ||||
// We make sure this node will have replay protection during the next hard | // We make sure this node will have replay protection during the next hard | ||||
// fork. | // fork. | ||||
if (IsReplayProtectionEnabled(config, pindex)) { | if (IsReplayProtectionEnabled(config, pindex)) { | ||||
flags |= SCRIPT_ENABLE_REPLAY_PROTECTION; | flags |= SCRIPT_ENABLE_REPLAY_PROTECTION; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 4,024 Lines • Show Last 20 Lines |