error rework, for polkadot convenience (#7446)

Co-authored-by: Bernhard Schuster <bernhard@parity.io>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Bernhard Schuster
2020-10-28 15:04:56 +01:00
committed by GitHub
parent 1679919830
commit 9687759774
17 changed files with 152 additions and 128 deletions
+1 -2
View File
@@ -114,8 +114,7 @@ pub trait CallExecutor<B: BlockT> {
) -> Result<(Vec<u8>, StorageProof), sp_blockchain::Error> {
let trie_state = state.as_trie_backend()
.ok_or_else(||
Box::new(sp_state_machine::ExecutionError::UnableToGenerateProof)
as Box<dyn sp_state_machine::Error>
sp_blockchain::Error::from_state(Box::new(sp_state_machine::ExecutionError::UnableToGenerateProof) as Box<_>)
)?;
self.prove_at_trie_state(trie_state, overlay, method, call_data)
}