mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +00:00
BlockId removal: refactor of runtime API (#6721)
* BlockId removal: refactor of runtime API
It changes the first argument of all generated runtime API calls from: `BlockId<Block>` to: `Block::Hash`
* fmt
* update lockfile for {"substrate"}
---------
Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
35a0d69af8
commit
d091a84a07
@@ -56,9 +56,8 @@ impl InitPolkadotBlockBuilder for Client {
|
||||
&self,
|
||||
hash: <Block as BlockT>::Hash,
|
||||
) -> BlockBuilder<Block, Client, FullBackend> {
|
||||
let at = BlockId::Hash(hash);
|
||||
let last_timestamp =
|
||||
self.runtime_api().get_last_timestamp(&at).expect("Get last timestamp");
|
||||
self.runtime_api().get_last_timestamp(hash).expect("Get last timestamp");
|
||||
|
||||
// `MinimumPeriod` is a storage parameter type that requires externalities to access the value.
|
||||
let minimum_period = BasicExternalities::new_empty()
|
||||
@@ -88,7 +87,7 @@ impl InitPolkadotBlockBuilder for Client {
|
||||
};
|
||||
|
||||
let mut block_builder = self
|
||||
.new_block_at(&at, digest, false)
|
||||
.new_block_at(&BlockId::Hash(hash), digest, false)
|
||||
.expect("Creates new block builder for test runtime");
|
||||
|
||||
let mut inherent_data = sp_inherents::InherentData::new();
|
||||
|
||||
Reference in New Issue
Block a user