Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/shim/state_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ where
Ok(StateTree::FvmV2(st))
} else if let Ok(st) = super::state_tree_v0::StateTreeV0::new_from_root(store.clone(), c) {
Ok(StateTree::V0(st))
} else if !store.has(c)? {
bail!("No state tree found with root {c}.")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bail!("No state tree exist for the root {c}.") ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

} else {
let state_root = store.get_cbor::<StateRoot>(c).ok().flatten();
let state_root_version = state_root
Expand Down
4 changes: 3 additions & 1 deletion src/state_manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,7 @@ where
callback: Option<impl FnMut(MessageCallbackCtx<'_>) -> anyhow::Result<()>>,
enable_tracing: VMTrace,
) -> Result<StateOutput, Error> {
let epoch = tipset.epoch();
Ok(apply_block_messages(
self.chain_store().genesis_block_header().timestamp,
Arc::clone(&self.chain_store().chain_index),
Expand All @@ -866,7 +867,8 @@ where
tipset,
callback,
enable_tracing,
)?)
)
.map_err(|e| anyhow::anyhow!("Failed to compute tipset state@{epoch}: {e}"))?)
}

#[instrument(skip_all)]
Expand Down
Loading