mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
Strict match of errors in backfill sync (#6520)
* Strict match of errors in backfill sync * Fix tests
This commit is contained in:
@@ -2669,9 +2669,7 @@ async fn weak_subjectivity_sync_test(slots: Vec<Slot>, checkpoint_slot: Slot) {
|
||||
// Forwards iterator from 0 should fail as we lack blocks.
|
||||
assert!(matches!(
|
||||
beacon_chain.forwards_iter_block_roots(Slot::new(0)),
|
||||
Err(BeaconChainError::HistoricalBlockError(
|
||||
HistoricalBlockError::BlockOutOfRange { .. }
|
||||
))
|
||||
Err(BeaconChainError::HistoricalBlockOutOfRange { .. })
|
||||
));
|
||||
|
||||
// Simulate processing of a `StatusMessage` with an older finalized epoch by calling
|
||||
@@ -2739,7 +2737,7 @@ async fn weak_subjectivity_sync_test(slots: Vec<Slot>, checkpoint_slot: Slot) {
|
||||
beacon_chain
|
||||
.import_historical_block_batch(batch_with_invalid_first_block)
|
||||
.unwrap_err(),
|
||||
BeaconChainError::HistoricalBlockError(HistoricalBlockError::InvalidSignature)
|
||||
HistoricalBlockError::InvalidSignature
|
||||
));
|
||||
|
||||
// Importing the batch with valid signatures should succeed.
|
||||
|
||||
Reference in New Issue
Block a user