Skip to content

Commit 022a646

Browse files
authored
chore: fix confusing comment in E2HSManager (#1857)
1 parent d5f95e0 commit 022a646

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/trin-execution/src/e2hs/manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl E2HSManager {
6060

6161
pub async fn last_fetched_block(&self) -> anyhow::Result<&ProcessedBlock> {
6262
let Some(current_e2hs) = &self.current_e2hs else {
63-
panic!("current_e2hs should always be present, perhaps it wasn't initialized in E2HSManager::new()?");
63+
bail!("No blocks were fetched yet, last_fetched_block is available only after successful get_next_block");
6464
};
6565
ensure!(
6666
self.next_block_number > 0,

0 commit comments

Comments
 (0)