Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 594 Lines • ▼ Show 20 Lines | bool IsMagneticAnomalyEnabled(const Config &config, | ||||
return IsMagneticAnomalyEnabled(config, pindexPrev->GetMedianTimePast()); | return IsMagneticAnomalyEnabled(config, pindexPrev->GetMedianTimePast()); | ||||
} | } | ||||
static bool IsMagneticAnomalyEnabledForCurrentBlock(const Config &config) { | static bool IsMagneticAnomalyEnabledForCurrentBlock(const Config &config) { | ||||
AssertLockHeld(cs_main); | AssertLockHeld(cs_main); | ||||
return IsMagneticAnomalyEnabled(config, chainActive.Tip()); | return IsMagneticAnomalyEnabled(config, chainActive.Tip()); | ||||
} | } | ||||
// Command-line argument "-replayprotectionactivationtime=<timestamp>" will | |||||
// cause the node to switch to replay protected SigHash ForkID value when the | |||||
// median timestamp of the previous 11 blocks is greater than or equal to | |||||
// <timestamp>. Defaults to the pre-defined timestamp when not set. | |||||
static bool IsReplayProtectionEnabled(const Config &config, | static bool IsReplayProtectionEnabled(const Config &config, | ||||
int64_t nMedianTimePast) { | int64_t nMedianTimePast) { | ||||
return nMedianTimePast >= gArgs.GetArg("-replayprotectionactivationtime", | return nMedianTimePast >= gArgs.GetArg("-replayprotectionactivationtime", | ||||
config.GetChainParams() | config.GetChainParams() | ||||
.GetConsensus() | .GetConsensus() | ||||
.magneticAnomalyActivationTime); | .greatWallActivationTime); | ||||
} | } | ||||
static bool IsReplayProtectionEnabled(const Config &config, | static bool IsReplayProtectionEnabled(const Config &config, | ||||
const CBlockIndex *pindexPrev) { | const CBlockIndex *pindexPrev) { | ||||
if (pindexPrev == nullptr) { | if (pindexPrev == nullptr) { | ||||
return false; | return false; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 4,961 Lines • Show Last 20 Lines |