Merge remote-tracking branch 'origin/paul-gossip-test' into validator-enhancements

This commit is contained in:
Age Manning 2019-04-01 15:53:51 +11:00
commit 8e5829c0ba
No known key found for this signature in database
GPG Key ID: 05EED64B79E06A93

View File

@ -15,7 +15,7 @@ use types::{Attestation, BeaconBlock, Epoch, Hash256, Slot};
const SLOT_IMPORT_TOLERANCE: u64 = 100; const SLOT_IMPORT_TOLERANCE: u64 = 100;
/// The amount of seconds a block (or partial block) may exist in the import queue. /// The amount of seconds a block (or partial block) may exist in the import queue.
const QUEUE_STALE_SECS: u64 = 60; const QUEUE_STALE_SECS: u64 = 600;
/// If a block is more than `FUTURE_SLOT_TOLERANCE` slots ahead of our slot clock, we drop it. /// If a block is more than `FUTURE_SLOT_TOLERANCE` slots ahead of our slot clock, we drop it.
/// Otherwise we queue it. /// Otherwise we queue it.
@ -589,6 +589,9 @@ impl SimpleSync {
"parent_root" => format!("{}", block.previous_block_root), "parent_root" => format!("{}", block.previous_block_root),
"peer" => format!("{:?}", peer_id), "peer" => format!("{:?}", peer_id),
); );
// Queue the block for later processing.
self.import_queue
.enqueue_full_blocks(vec![block], peer_id.clone());
// Send a hello to learn of the clients best slot so we can then sync the require // Send a hello to learn of the clients best slot so we can then sync the require
// parent(s). // parent(s).
network.send_rpc_request( network.send_rpc_request(