mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: make more descriptive errors instead of ProviderError (#7380)
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
This commit is contained in:
@ -409,7 +409,7 @@ impl StorageInner {
|
||||
// calculate the state root
|
||||
let state_root = client
|
||||
.latest()
|
||||
.map_err(|_| BlockExecutionError::ProviderError)?
|
||||
.map_err(BlockExecutionError::LatestBlock)?
|
||||
.state_root(bundle_state.state())
|
||||
.unwrap();
|
||||
header.state_root = state_root;
|
||||
@ -439,7 +439,9 @@ impl StorageInner {
|
||||
|
||||
// now execute the block
|
||||
let db = State::builder()
|
||||
.with_database_boxed(Box::new(StateProviderDatabase::new(client.latest().unwrap())))
|
||||
.with_database_boxed(Box::new(StateProviderDatabase::new(
|
||||
client.latest().map_err(BlockExecutionError::LatestBlock)?,
|
||||
)))
|
||||
.with_bundle_update()
|
||||
.build();
|
||||
let mut executor = EVMProcessor::new_with_state(chain_spec.clone(), db, evm_config);
|
||||
|
||||
Reference in New Issue
Block a user