Command-line argument "-replayprotectionactivationtime= " 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 . Defaults to the pre-defined timestamp when not set.
| 222 | // median timestamp of the previous 11 blocks is greater than or equal to |
| 223 | // <timestamp>. Defaults to the pre-defined timestamp when not set. |
| 224 | static bool |
| 225 | IsReplayProtectionEnabled(const Consensus::Params ¶ms, |
| 226 | const CBlockIndex *pindexPrev, |
| 227 | const std::optional<int64_t> activation_time) { |
| 228 | if (pindexPrev == nullptr) { |
| 229 | return false; |
| 230 | } |
| 231 | |
| 232 | return pindexPrev->GetMedianTimePast() >= |
| 233 | activation_time.value_or(params.mengerActivationTime); |
| 234 | } |
| 235 | |
| 236 | /** |
| 237 | * Checks to avoid mempool polluting consensus critical paths since cached |
no test coverage detected