Skip to content
Snippets Groups Projects
Commit 0910175e authored by Pierre Krieger's avatar Pierre Krieger Committed by GitHub
Browse files

Remove using a network message in the chain_ops (?!?!) (#4999)

parent 9cb35b97
No related merge requests found
......@@ -36,8 +36,6 @@ use sc_executor::{NativeExecutor, NativeExecutionDispatch};
use std::{io::{Read, Write, Seek}, pin::Pin};
use sc_network::message;
/// Build a chain spec json
pub fn build_spec<G, E>(spec: ChainSpec<G, E>, raw: bool) -> error::Result<String> where
G: RuntimeGenesis,
......@@ -141,21 +139,13 @@ impl<
Ok(signed) => {
let (header, extrinsics) = signed.block.deconstruct();
let hash = header.hash();
let block = message::BlockData::<Self::Block> {
hash,
justification: signed.justification,
header: Some(header),
body: Some(extrinsics),
receipt: None,
message_queue: None
};
// import queue handles verification and importing it into the client
queue.import_blocks(BlockOrigin::File, vec![
IncomingBlock::<Self::Block> {
hash: block.hash,
header: block.header,
body: block.body,
justification: block.justification,
hash,
header: Some(header),
body: Some(extrinsics),
justification: signed.justification,
origin: None,
allow_missing_state: false,
import_existing: force,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment