consolidate retry error handling

This commit is contained in:
realbigsean
2023-04-24 15:05:49 -04:00
parent b6531aa1b1
commit 274aba95c7
2 changed files with 129 additions and 117 deletions

View File

@@ -347,8 +347,12 @@ impl<T: BeaconChainTypes> SyncManager<T> {
trace!(self.log, "Sync manager received a failed RPC");
match request_id {
RequestId::SingleBlock { id } => {
self.block_lookups
.single_block_lookup_failed(id, &mut self.network);
self.block_lookups.single_block_lookup_failed(
id,
&peer_id,
&mut self.network,
error,
);
}
RequestId::ParentLookup { id } => {
self.block_lookups