commit
5a96f99a8c
@ -481,6 +481,7 @@ impl ChainSync {
|
|||||||
trace!(target: "sync", "{} -> NewBlock ({})", peer_id, h);
|
trace!(target: "sync", "{} -> NewBlock ({})", peer_id, h);
|
||||||
if !self.have_common_block {
|
if !self.have_common_block {
|
||||||
trace!(target: "sync", "NewBlock ignored while seeking");
|
trace!(target: "sync", "NewBlock ignored while seeking");
|
||||||
|
return Ok(());
|
||||||
}
|
}
|
||||||
let header: BlockHeader = try!(header_rlp.as_val());
|
let header: BlockHeader = try!(header_rlp.as_val());
|
||||||
let mut unknown = false;
|
let mut unknown = false;
|
||||||
@ -1497,6 +1498,7 @@ mod tests {
|
|||||||
|
|
||||||
let mut queue = VecDeque::new();
|
let mut queue = VecDeque::new();
|
||||||
let mut sync = dummy_sync_with_peer(client.block_hash_delta_minus(5));
|
let mut sync = dummy_sync_with_peer(client.block_hash_delta_minus(5));
|
||||||
|
sync.have_common_block = true;
|
||||||
let mut io = TestIo::new(&mut client, &mut queue, None);
|
let mut io = TestIo::new(&mut client, &mut queue, None);
|
||||||
|
|
||||||
let block = UntrustedRlp::new(&block_data);
|
let block = UntrustedRlp::new(&block_data);
|
||||||
|
Loading…
Reference in New Issue
Block a user