mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 11:35:41 +00:00
clear statedb panics (#797)
* state-db: remove the assertion and replace it with Result<> * state-db: unit test fixes * comment fixes * typo fix
This commit is contained in:
@@ -603,7 +603,8 @@ impl<Block> client::backend::Backend<Block, Blake2Hasher> for Backend<Block> whe
|
||||
}
|
||||
}
|
||||
let number_u64 = number.as_();
|
||||
let commit = self.storage.state_db.insert_block(&hash, number_u64, &pending_block.header.parent_hash(), changeset);
|
||||
let commit = self.storage.state_db.insert_block(&hash, number_u64, &pending_block.header.parent_hash(), changeset)
|
||||
.map_err(|e: state_db::Error<io::Error>| client::error::Error::from(format!("State database error: {:?}", e)))?;
|
||||
apply_state_commit(&mut transaction, commit);
|
||||
apply_changes_trie_commit(&mut transaction, operation.changes_trie_updates);
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ error_chain! {
|
||||
display("Current state of blockchain has invalid authorities set"),
|
||||
}
|
||||
|
||||
/// Cound not get runtime version.
|
||||
/// Could not get runtime version.
|
||||
VersionInvalid {
|
||||
description("Runtime version error"),
|
||||
display("On-chain runtime does not specify version"),
|
||||
|
||||
Reference in New Issue
Block a user