Sync wrong dbg assertion (#2821)

## Issue Addressed

Running a beacon node I triggered a sync debug panic. And so finally the time to create tests for sync arrived. Fortunately, te bug was not in the sync algorithm itself but a wrong assertion

## Proposed Changes

- Split Range's impl from the BeaconChain via a trait. This is needed for testing. The TestingRig/Harness is way bigger than needed and does not provide the modification functionalities that are needed to test sync. I find this simpler, tho some could disagree.
- Add a regression test for sync that fails before the changes.
- Fix the wrong assertion.
This commit is contained in:
Divma
2021-11-19 02:38:25 +00:00
parent e519af9012
commit 31386277c3
7 changed files with 306 additions and 27 deletions

View File

@@ -2,6 +2,7 @@
//! peers.
mod batch;
mod block_storage;
mod chain;
mod chain_collection;
mod range;