From 5e80b90301d1abab663180d7d13278987b6597e1 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Mon, 1 Apr 2019 15:51:48 +1100 Subject: [PATCH] Extend queue stale time, queue more blocks --- beacon_node/network/src/sync/simple_sync.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/beacon_node/network/src/sync/simple_sync.rs b/beacon_node/network/src/sync/simple_sync.rs index 038975f05..9a1e51bdd 100644 --- a/beacon_node/network/src/sync/simple_sync.rs +++ b/beacon_node/network/src/sync/simple_sync.rs @@ -15,7 +15,7 @@ use types::{Attestation, BeaconBlock, Epoch, Hash256, Slot}; const SLOT_IMPORT_TOLERANCE: u64 = 100; /// 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. /// Otherwise we queue it. @@ -589,6 +589,9 @@ impl SimpleSync { "parent_root" => format!("{}", block.previous_block_root), "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 // parent(s). network.send_rpc_request(