mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 22:11:06 +00:00
move import queue to consensus-common (#1282)
This commit is contained in:
committed by
Robert Habermeier
parent
35ba22cdd1
commit
3add75910a
@@ -21,7 +21,7 @@ use futures::Future;
|
||||
|
||||
use runtime_primitives::generic::{SignedBlock, BlockId};
|
||||
use runtime_primitives::traits::{As, Block, Header};
|
||||
use network::import_queue::{ImportQueue, Link, BlockData};
|
||||
use consensus_common::import_queue::{ImportQueue, IncomingBlock, Link};
|
||||
use network::message;
|
||||
|
||||
use consensus_common::BlockOrigin;
|
||||
@@ -123,7 +123,15 @@ pub fn import_blocks<F, E, R>(mut config: FactoryFullConfiguration<F>, exit: E,
|
||||
message_queue: None
|
||||
};
|
||||
// import queue handles verification and importing it into the client
|
||||
queue.import_blocks(BlockOrigin::File, vec![BlockData::<F::Block> { block, origin: None }]);
|
||||
queue.import_blocks(BlockOrigin::File, vec![
|
||||
IncomingBlock::<F::Block>{
|
||||
hash: block.hash,
|
||||
header: block.header,
|
||||
body: block.body,
|
||||
justification: block.justification,
|
||||
origin: None,
|
||||
}
|
||||
]);
|
||||
} else {
|
||||
warn!("Error reading block data at {}.", b);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user