mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
BlockId removal: refactor of runtime API (#2190)
* BlockId removal: refactor of runtime API
It changes the first argument of all generated runtime API calls from: `BlockId<Block>` to: `Block::Hash`
* fmt
* cargo update -p polkadot-primitives
* Revert "cargo update -p polkadot-primitives"
This reverts commit 58506ecd31e1e5e42b78c2db3982acbc4d8edc70.
* update lockfile for {"substrate", "polkadot"}
---------
Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
c0ac6a960b
commit
5b42b5fdfa
@@ -27,10 +27,7 @@ use sp_block_builder::BlockBuilder as BlockBuilderApi;
|
||||
use sp_blockchain::Result as ClientResult;
|
||||
use sp_consensus::{error::Error as ConsensusError, CacheKeyId};
|
||||
use sp_inherents::{CreateInherentDataProviders, InherentDataProvider};
|
||||
use sp_runtime::{
|
||||
generic::BlockId,
|
||||
traits::{Block as BlockT, Header as HeaderT},
|
||||
};
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT};
|
||||
|
||||
/// A verifier that just checks the inherents.
|
||||
pub struct Verifier<Client, Block, CIDP> {
|
||||
@@ -83,11 +80,7 @@ where
|
||||
let inherent_res = self
|
||||
.client
|
||||
.runtime_api()
|
||||
.check_inherents(
|
||||
&BlockId::Hash(*block.header().parent_hash()),
|
||||
block.clone(),
|
||||
inherent_data,
|
||||
)
|
||||
.check_inherents(*block.header().parent_hash(), block.clone(), inherent_data)
|
||||
.map_err(|e| format!("{:?}", e))?;
|
||||
|
||||
if !inherent_res.ok() {
|
||||
|
||||
Reference in New Issue
Block a user