mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 22:21:07 +00:00
Refactor BlockImportParams to be non_exhaustive (#4936)
* Refactor BlockImportParams to be non_exhaustive * Fix cargo check compile
This commit is contained in:
@@ -358,20 +358,9 @@ fn generate_block_import(client: &Client, keyring: &BenchKeyring) -> Block {
|
||||
|
||||
// Import generated block.
|
||||
fn import_block(client: &mut Client, block: Block) {
|
||||
let import_params = BlockImportParams {
|
||||
origin: BlockOrigin::NetworkBroadcast,
|
||||
header: block.header().clone(),
|
||||
post_digests: Default::default(),
|
||||
body: Some(block.extrinsics().to_vec()),
|
||||
storage_changes: Default::default(),
|
||||
finalized: false,
|
||||
justification: Default::default(),
|
||||
auxiliary: Default::default(),
|
||||
intermediates: Default::default(),
|
||||
fork_choice: Some(ForkChoiceStrategy::LongestChain),
|
||||
allow_missing_state: false,
|
||||
import_existing: false,
|
||||
};
|
||||
let mut import_params = BlockImportParams::new(BlockOrigin::NetworkBroadcast, block.header.clone());
|
||||
import_params.body = Some(block.extrinsics().to_vec());
|
||||
import_params.fork_choice = Some(ForkChoiceStrategy::LongestChain);
|
||||
|
||||
assert_eq!(client.chain_info().best_number, 0);
|
||||
|
||||
@@ -500,4 +489,4 @@ fn profile_block_import(c: &mut Criterion) {
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user