From 3e6c2a5f45639072983c3343530dab555fad7826 Mon Sep 17 00:00:00 2001 From: raychu86 <14917648+raychu86@users.noreply.github.com> Date: Sun, 3 Mar 2024 15:22:44 -0800 Subject: [PATCH] Do not gc during bootup --- node/bft/src/bft.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/node/bft/src/bft.rs b/node/bft/src/bft.rs index 2157dce6d7..0ca528f96f 100644 --- a/node/bft/src/bft.rs +++ b/node/bft/src/bft.rs @@ -624,8 +624,10 @@ impl BFT { } } - // Perform garbage collection based on the latest committed leader round. - self.storage().garbage_collect_certificates(latest_leader_round); + // Perform garbage collection based on the latest committed leader round if the node is not syncing. + if !IS_SYNCING { + self.storage().garbage_collect_certificates(latest_leader_round); + } Ok(()) }