mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 01:07:57 +00:00
Simplify runtime api error handling (#8114)
* Ahh * Work work work * Fix all the compilation errors * Fix test * More fixes...
This commit is contained in:
@@ -215,7 +215,7 @@ impl CallExecutor<Block> for DummyCallExecutor {
|
||||
Result<NativeOrEncoded<R>, Self::Error>
|
||||
) -> Result<NativeOrEncoded<R>, Self::Error>,
|
||||
R: Encode + Decode + PartialEq,
|
||||
NC: FnOnce() -> Result<R, String> + UnwindSafe,
|
||||
NC: FnOnce() -> Result<R, sp_api::ApiError> + UnwindSafe,
|
||||
>(
|
||||
&self,
|
||||
_initialize_block_fn: IB,
|
||||
|
||||
@@ -1327,7 +1327,9 @@ fn doesnt_import_blocks_that_revert_finality() {
|
||||
|
||||
let import_err = client.import(BlockOrigin::Own, b3).err().unwrap();
|
||||
let expected_err = ConsensusError::ClientImport(
|
||||
sp_blockchain::Error::NotInFinalizedChain.to_string()
|
||||
sp_blockchain::Error::RuntimeApiError(
|
||||
sp_api::ApiError::Application(Box::new(sp_blockchain::Error::NotInFinalizedChain))
|
||||
).to_string()
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
|
||||
Reference in New Issue
Block a user