BlockId removal: BlockBuilderProvider::new_block_at (#13401)

* `BlockId` removal: `BlockBuilderProvider::new_block_at`

It changes the arguments of `BlockBuilderProvider::new_block_at` from:
`BlockId<Block>` to: `Block::Hash`

* fmt

* fix

* more fixes
This commit is contained in:
Michal Kucharczyk
2023-02-21 19:36:00 +01:00
committed by GitHub
parent cd299d2b45
commit 5ef88dd398
15 changed files with 175 additions and 196 deletions
+3 -6
View File
@@ -45,7 +45,7 @@ use sp_keystore::{
SyncCryptoStore,
};
use sp_runtime::{
generic::{BlockId, Digest, DigestItem},
generic::{Digest, DigestItem},
traits::Block as BlockT,
};
use sp_timestamp::Timestamp;
@@ -123,11 +123,8 @@ impl DummyProposer {
Error,
>,
> {
let block_builder = self
.factory
.client
.new_block_at(&BlockId::Hash(self.parent_hash), pre_digests, false)
.unwrap();
let block_builder =
self.factory.client.new_block_at(self.parent_hash, pre_digests, false).unwrap();
let mut block = match block_builder.build().map_err(|e| e.into()) {
Ok(b) => b.block,