From 613382f3042428baccec53e15d7bda6ad889ec48 Mon Sep 17 00:00:00 2001 From: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu, 18 Feb 2021 08:24:46 +0000 Subject: [PATCH] Add slot offset computing to be downloaded slot (#2198) The current implementation assumes the range offset of slots downloaded on a batch to equal zero. This conflicts with the condition to consider this chain as sync. For finalized sync, it results in one extra batch being downloaded which can't be processed. CC @wemeetagain --- beacon_node/network/src/sync/range_sync/chain.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_node/network/src/sync/range_sync/chain.rs b/beacon_node/network/src/sync/range_sync/chain.rs index 01466e2a9..7483d1d10 100644 --- a/beacon_node/network/src/sync/range_sync/chain.rs +++ b/beacon_node/network/src/sync/range_sync/chain.rs @@ -963,7 +963,7 @@ impl SyncingChain { if self .to_be_downloaded .start_slot(T::EthSpec::slots_per_epoch()) - > self.target_head_slot + >= self.target_head_slot { return None; }