mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-19 05:15:40 +00:00
Remove usage of substrate-test-runtime. (#969)
* Switch from using the substrate_test_runtime Extrinsic to the polkadot_test_runtime one * Copy genesismap into test-runtime * Add UncheckedExtrinsics * Fix tests :^) * Remove unused functions from genesismap * DRY, clean up * Clean up * Update service/src/grandpa_support.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Fix indentation * Update runtime/test-runtime/src/genesismap.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -27,7 +27,15 @@ use super::*;
|
||||
|
||||
fn prepare_good_block() -> (TestClient, Hash, u64, PeerId, IncomingBlock<Block>) {
|
||||
let mut client = polkadot_test_runtime_client::new();
|
||||
let block = client.new_block(Default::default()).unwrap().build().unwrap().block;
|
||||
let mut builder = client.new_block(Default::default()).unwrap();
|
||||
|
||||
let extrinsics = polkadot_test_runtime_client::needed_extrinsics(vec![]);
|
||||
|
||||
for extrinsic in &extrinsics {
|
||||
builder.push(extrinsic.clone()).unwrap();
|
||||
}
|
||||
|
||||
let block = builder.build().unwrap().block;
|
||||
client.import(BlockOrigin::File, block).unwrap();
|
||||
|
||||
let (hash, number) = (client.block_hash(1).unwrap().unwrap(), 1);
|
||||
@@ -37,7 +45,7 @@ fn prepare_good_block() -> (TestClient, Hash, u64, PeerId, IncomingBlock<Block>)
|
||||
(client, hash, number, peer_id.clone(), IncomingBlock {
|
||||
hash,
|
||||
header,
|
||||
body: Some(Vec::new()),
|
||||
body: Some(extrinsics),
|
||||
justification,
|
||||
origin: Some(peer_id.clone()),
|
||||
allow_missing_state: false,
|
||||
|
||||
Reference in New Issue
Block a user