From 3799e363e99c53df90e1445068d320e363ca8576 Mon Sep 17 00:00:00 2001 From: Prasanna Loganathar Date: Tue, 10 Sep 2024 12:49:10 +0800 Subject: [PATCH] simplify check --- src/miner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index bf919873601..4c662d35177 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1224,7 +1224,7 @@ namespace pos { pcustomcsview->GetBlockTimes(operatorId, blockHeight, creationHeight, *timeLock)[subNode]; const auto attributes = pcustomcsview->GetAttributes(); CDataStructureV0 enabledKey{AttributeTypes::Param, ParamIDs::Feature, DFIPKeys::AscendingBlockTime}; - ascendingEnabled = attributes->GetValue(enabledKey, false); + ascendingEnabled = attributes->GetValue(enabledKey, false) || gArgs.GetBoolArg("-ascendingstaketime", false); } auto nBits = pos::GetNextWorkRequired(tip, blockTime, chainparams.GetConsensus()); @@ -1239,7 +1239,7 @@ namespace pos { nLastCoinStakeSearchTime = tip->GetMedianTimePast() + 1; } } else { - if (gArgs.GetBoolArg("-ascendingstaketime", false) || ascendingEnabled) { + if (ascendingEnabled) { // Set time to last block time. New blocks must be after the last block. nLastCoinStakeSearchTime = tip->GetBlockTime(); } else {