From f7d8fbe48e3255e85b62c7086a5adc90114dfeca Mon Sep 17 00:00:00 2001 From: Renato Dinhani <101204870+dinhani-cw@users.noreply.github.com> Date: Thu, 21 Mar 2024 07:20:26 -0300 Subject: [PATCH] fix: sled reset should also reset inner temp storage (#418) --- src/eth/storage/sled/sled_temporary.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/eth/storage/sled/sled_temporary.rs b/src/eth/storage/sled/sled_temporary.rs index d0748005a..690cef486 100644 --- a/src/eth/storage/sled/sled_temporary.rs +++ b/src/eth/storage/sled/sled_temporary.rs @@ -147,7 +147,13 @@ impl TemporaryStorage for SledTemporary { } async fn reset(&self) -> anyhow::Result<()> { + // reset temp + let mut temp_lock = self.temp.lock_write().await; + temp_lock.reset(); + + // reset sled self.db.clear()?; + Ok(()) } }