mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 04:01:51 +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:
@@ -10,8 +10,7 @@
|
||||
|
||||
use crate::network_beacon_processor::ChainSegmentProcessId;
|
||||
use crate::sync::manager::BatchProcessResult;
|
||||
use crate::sync::network_context::RangeRequestId;
|
||||
use crate::sync::network_context::SyncNetworkContext;
|
||||
use crate::sync::network_context::{RangeRequestId, RpcResponseError, SyncNetworkContext};
|
||||
use crate::sync::range_sync::{
|
||||
BatchConfig, BatchId, BatchInfo, BatchOperationOutcome, BatchProcessingResult, BatchState,
|
||||
};
|
||||
@@ -375,6 +374,7 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
||||
batch_id: BatchId,
|
||||
peer_id: &PeerId,
|
||||
request_id: Id,
|
||||
err: RpcResponseError,
|
||||
) -> Result<(), BackFillError> {
|
||||
if let Some(batch) = self.batches.get_mut(&batch_id) {
|
||||
// A batch could be retried without the peer failing the request (disconnecting/
|
||||
@@ -385,7 +385,7 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
||||
if !batch.is_expecting_block(&request_id) {
|
||||
return Ok(());
|
||||
}
|
||||
debug!(batch_epoch = %batch_id, error = "rpc_error", "Batch failed");
|
||||
debug!(batch_epoch = %batch_id, error = ?err, "Batch download failed");
|
||||
if let Some(active_requests) = self.active_requests.get_mut(peer_id) {
|
||||
active_requests.remove(&batch_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user