Skip to content

Commit

Permalink
fix: avoid extra work in GetListForBlockInternal before dip0003 activ…
Browse files Browse the repository at this point in the history
…ation

Less evodb reads, no `initial snapshot` spam in logs
  • Loading branch information
UdjinM6 committed Jan 10, 2025
1 parent 3edc738 commit 82684ea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/evo/deterministicmns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1026,8 +1026,14 @@ void CDeterministicMNManager::HandleQuorumCommitment(const llmq::CFinalCommitmen

CDeterministicMNList CDeterministicMNManager::GetListForBlockInternal(gsl::not_null<const CBlockIndex*> pindex)
{
AssertLockHeld(cs);
CDeterministicMNList snapshot;

if (!DeploymentActiveAt(*pindex, Params().GetConsensus(), Consensus::DEPLOYMENT_DIP0003)) {
return snapshot;
}

AssertLockHeld(cs);

std::list<const CBlockIndex*> listDiffIndexes;

while (true) {
Expand Down

0 comments on commit 82684ea

Please sign in to comment.