improve efficiency by gating locks with

This commit is contained in:
James Dorfman 2024-05-27 09:25:31 +00:00
parent b4185c7008
commit 46a3ee29bc
2 changed files with 5 additions and 4 deletions

View file

@ -489,7 +489,7 @@ std::vector<std::pair<CScript, CScript>> GetValidFedpegScripts(const CBlockIndex
break;
}
{
if (node::fTrimHeaders) {
LOCK(cs_main);
ForceUntrimHeader(p_epoch_start);
}