mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 21:34:46 +00:00
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:
@@ -1,3 +1,5 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use beacon_chain::{BeaconChain, BeaconChainError, BeaconChainTypes};
|
||||
|
||||
use lighthouse_network::rpc::StatusMessage;
|
||||
@@ -23,3 +25,9 @@ impl<T: BeaconChainTypes> ToStatusMessage for BeaconChain<T> {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: BeaconChainTypes> ToStatusMessage for Arc<BeaconChain<T>> {
|
||||
fn status_message(&self) -> Result<StatusMessage, BeaconChainError> {
|
||||
<BeaconChain<T> as ToStatusMessage>::status_message(self)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user