From c01fb9f0da6dd542a2873215d08c0de328a14798 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Sun, 23 Jun 2024 12:29:09 +0200 Subject: [PATCH] further reduce stack size --- beacon_chain/gossip_processing/light_client_processor.nim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/beacon_chain/gossip_processing/light_client_processor.nim b/beacon_chain/gossip_processing/light_client_processor.nim index ed37acb73..90475f105 100644 --- a/beacon_chain/gossip_processing/light_client_processor.nim +++ b/beacon_chain/gossip_processing/light_client_processor.nim @@ -270,9 +270,10 @@ proc processObject( of VerifierError.Duplicate: if wallTime >= self.lastDuplicateTick + duplicateRateLimit: if self.numDupsSinceProgress < minForceUpdateDuplicates: - let upgradedObj = obj.migratingToDataFork(lcDataFork) - if upgradedObj.forky(lcDataFork).matches( - forkyStore.best_valid_update.get): + let best = forkyStore.best_valid_update.get + if (proc(): bool = # Reduce stack size + let upgradedObj = obj.migratingToDataFork(lcDataFork) + upgradedObj.forky(lcDataFork).matches(best))(): self.lastDuplicateTick = wallTime inc self.numDupsSinceProgress if self.numDupsSinceProgress >= minForceUpdateDuplicates and