chore: better start finish persisted block logs (#11893)

Co-authored-by: Oliver <onbjerg@users.noreply.github.com>
This commit is contained in:
Matthias Seitz
2024-10-19 15:05:53 +02:00
committed by GitHub
parent 3bd695ee63
commit 3793b907ea

View File

@ -1145,6 +1145,7 @@ where
if blocks_to_persist.is_empty() {
debug!(target: "engine::tree", "Returned empty set of blocks to persist");
} else {
debug!(target: "engine::tree", blocks = ?blocks_to_persist.iter().map(|block| block.block.num_hash()).collect::<Vec<_>>(), "Persisting blocks");
let (tx, rx) = oneshot::channel();
let _ = self.persistence.save_blocks(blocks_to_persist, tx);
self.persistence_state.start(rx);
@ -1173,7 +1174,7 @@ where
return Ok(())
};
trace!(target: "engine::tree", ?last_persisted_block_hash, ?last_persisted_block_number, "Finished persisting, calling finish");
debug!(target: "engine::tree", ?last_persisted_block_hash, ?last_persisted_block_number, "Finished persisting, calling finish");
self.persistence_state
.finish(last_persisted_block_hash, last_persisted_block_number);
self.on_new_persisted_block()?;