mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 10:52:43 +00:00
Log range sync download errors (#6991)
Currently range sync download log errors just say `error: rpc_error` which isn't helpful. The actual error is suppressed unless logged somewhere else. Log the actual error that caused the batch download to fail as part of the log that states that the batch download failed.
This commit is contained in:
@@ -1288,7 +1288,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(_) => match range_request_id.requester {
|
||||
Err(e) => match range_request_id.requester {
|
||||
RangeRequestId::RangeSync { chain_id, batch_id } => {
|
||||
self.range_sync.inject_error(
|
||||
&mut self.network,
|
||||
@@ -1296,16 +1296,22 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
batch_id,
|
||||
chain_id,
|
||||
range_request_id.id,
|
||||
e,
|
||||
);
|
||||
self.update_sync_state();
|
||||
}
|
||||
RangeRequestId::BackfillSync { batch_id } => match self
|
||||
.backfill_sync
|
||||
.inject_error(&mut self.network, batch_id, &peer_id, range_request_id.id)
|
||||
{
|
||||
Ok(_) => {}
|
||||
Err(_) => self.update_sync_state(),
|
||||
},
|
||||
RangeRequestId::BackfillSync { batch_id } => {
|
||||
match self.backfill_sync.inject_error(
|
||||
&mut self.network,
|
||||
batch_id,
|
||||
&peer_id,
|
||||
range_request_id.id,
|
||||
e,
|
||||
) {
|
||||
Ok(_) => {}
|
||||
Err(_) => self.update_sync_state(),
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user