File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -785,11 +785,8 @@ CDeterministicMNList CDeterministicMNManager::GetListForBlockInternal(gsl::not_n
785785
786786 if (tipIndex) {
787787 // always keep a snapshot for the tip
788- if (snapshot.GetBlockHash () == tipIndex->GetBlockHash ()) {
789- auto hash = snapshot.GetBlockHash ();
790- if (mnListsCache.find (hash) == mnListsCache.end ()) {
791- mnListsCache.emplace (snapshot.GetBlockHash (), snapshot);
792- }
788+ if (const auto snapshot_hash = snapshot.GetBlockHash (); snapshot_hash == tipIndex->GetBlockHash ()) {
789+ mnListsCache.emplace (snapshot_hash, snapshot);
793790 } else {
794791 // keep snapshots for yet alive quorums
795792 if (ranges::any_of (Params ().GetConsensus ().llmqs ,
@@ -799,7 +796,7 @@ CDeterministicMNList CDeterministicMNManager::GetListForBlockInternal(gsl::not_n
799796 (snapshot.GetHeight () + params.dkgInterval * (params.keepOldConnections + 1 ) >=
800797 tipIndex->nHeight );
801798 })) {
802- mnListsCache.emplace (snapshot. GetBlockHash () , snapshot);
799+ mnListsCache.emplace (snapshot_hash , snapshot);
803800 }
804801 }
805802 }
You can’t perform that action at this time.
0 commit comments