diff --git a/base_layer/core/src/base_node/sync/header_sync/error.rs b/base_layer/core/src/base_node/sync/header_sync/error.rs index 998944f2c6..e83ee7c05a 100644 --- a/base_layer/core/src/base_node/sync/header_sync/error.rs +++ b/base_layer/core/src/base_node/sync/header_sync/error.rs @@ -98,8 +98,6 @@ impl BlockHeaderSyncError { match self { // no ban BlockHeaderSyncError::NoMoreSyncPeers(_) | - BlockHeaderSyncError::RpcError(_) | - BlockHeaderSyncError::RpcRequestError(_) | BlockHeaderSyncError::SyncFailedAllPeers | BlockHeaderSyncError::FailedToBan(_) | BlockHeaderSyncError::AllSyncPeersExceedLatency | @@ -109,7 +107,9 @@ impl BlockHeaderSyncError { BlockHeaderSyncError::ChainStorageError(_) => None, // short ban - err @ BlockHeaderSyncError::MaxLatencyExceeded { .. } => Some(BanReason { + err @ BlockHeaderSyncError::MaxLatencyExceeded { .. } | + err @ BlockHeaderSyncError::RpcError { .. } | + err @ BlockHeaderSyncError::RpcRequestError { .. } => Some(BanReason { reason: format!("{}", err), ban_duration: short_ban, }), diff --git a/base_layer/core/src/base_node/sync/horizon_state_sync/error.rs b/base_layer/core/src/base_node/sync/horizon_state_sync/error.rs index d0fa0dfe7a..dc0211125e 100644 --- a/base_layer/core/src/base_node/sync/horizon_state_sync/error.rs +++ b/base_layer/core/src/base_node/sync/horizon_state_sync/error.rs @@ -116,14 +116,14 @@ impl HorizonSyncError { HorizonSyncError::FailedSyncAllPeers | HorizonSyncError::AllSyncPeersExceedLatency | HorizonSyncError::ConnectivityError(_) | - HorizonSyncError::RpcError(_) | - HorizonSyncError::RpcStatus(_) | HorizonSyncError::NoMoreSyncPeers(_) | HorizonSyncError::PeerNotFound | HorizonSyncError::JoinError(_) => None, // short ban - err @ HorizonSyncError::MaxLatencyExceeded { .. } => Some(BanReason { + err @ HorizonSyncError::MaxLatencyExceeded { .. } | + err @ HorizonSyncError::RpcError { .. } | + err @ HorizonSyncError::RpcStatus { .. } => Some(BanReason { reason: format!("{}", err), ban_duration: short_ban, }),