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

This commit is contained in:
Pierre Krieger
2020-02-20 11:53:46 +01:00
committed by GitHub
parent 9cb35b9788
commit 0910175e10
+4 -14
View File
@@ -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,