From 7b18bc83686a0abe3cfcb92bc3a231888b9e26d0 Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Wed, 20 Sep 2023 14:12:57 +0700 Subject: [PATCH] fix: EHF takes care not only about nTimeOut but about nStartTime also --- src/chainparams.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 3bc1e3425d..738cc63cc7 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -110,8 +110,8 @@ bool CChainParams::UpdateMNActivationParam(int nBit, int height, int64_t timePas for (int index = 0; index < Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++index) { if (consensus.vDeployments[index].bit == nBit) { auto& deployment = consensus.vDeployments[index]; - if (timePast > deployment.nTimeout) { - LogPrintf("%s: activation by bit=%d for deployment %s timed out at height=%d\n", __func__, nBit, VersionBitsDeploymentInfo[Consensus::DeploymentPos(index)].name, height); + if (timePast > deployment.nTimeout || timePast < deployment.nStartTime) { + LogPrintf("%s: activation by bit=%d height=%d deployment='%s' is out of time range start=%lld timeout=%lld\n", __func__, nBit, height, VersionBitsDeploymentInfo[Consensus::DeploymentPos(index)].name, deployment.nStartTime, deployment.nTimeout); continue; } if (deployment.nMNActivationHeight < 0) {