Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Added block notification after import
Browse files Browse the repository at this point in the history
  • Loading branch information
arkpar committed Oct 19, 2018
1 parent df72212 commit 43943d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/network/src/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,11 @@ impl<V: 'static + Verifier<Block>> Peer<V> {
let mut builder = self.client.new_block().unwrap();
edit_block(&mut builder);
let block = builder.bake().unwrap();
trace!("Generating {}, (#{}, parent={})", block.header.hash(), block.header.number, block.header.parent_hash);
let hash = block.header.hash();
trace!("Generating {}, (#{}, parent={})", hash, block.header.number, block.header.parent_hash);
let header = block.header.clone();
self.client.justify_and_import(origin, block).unwrap();
self.sync.on_block_imported(&mut TestIo::new(&self.queue, None), hash, &header);
}
}

Expand Down

0 comments on commit 43943d7

Please sign in to comment.