From ce96ba85e4a0145bbdb4136a4ac2982c609d82a9 Mon Sep 17 00:00:00 2001 From: Alexey Shekhirin Date: Sun, 29 Sep 2024 18:51:04 +0300 Subject: [PATCH] clarify docs --- crates/exex/exex/src/wal/mod.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/crates/exex/exex/src/wal/mod.rs b/crates/exex/exex/src/wal/mod.rs index 31ee5b88d40e7..9389cac278577 100644 --- a/crates/exex/exex/src/wal/mod.rs +++ b/crates/exex/exex/src/wal/mod.rs @@ -50,12 +50,10 @@ impl Wal { self.inner.commit(notification) } - /// Finalizes the WAL to the given block, inclusive. + /// Finalizes the WAL up to the given canonical block, inclusive. /// - /// 1. Finds a notification with first unfinalized block (first notification containing a - /// committed block higher than `to_block`). - /// 2. Removes the notifications from the beginning of WAL until the found notification. If this - /// notification includes both finalized and non-finalized blocks, it will not be removed. + /// The caller should check that all ExExes are on the canonical chain and will not need any + /// blocks from the WAL below the provided block, inclusive. pub fn finalize(&self, to_block: BlockNumHash) -> eyre::Result<()> { self.inner.finalize(to_block) }