mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 00:42:42 +00:00
update unreachables to crits
This commit is contained in:
@@ -21,7 +21,7 @@ use lighthouse_network::{
|
|||||||
MessageId, NetworkGlobals, PeerId, PeerRequestId, PubsubMessage, Request, Response,
|
MessageId, NetworkGlobals, PeerId, PeerRequestId, PubsubMessage, Request, Response,
|
||||||
};
|
};
|
||||||
use logging::TimeLatch;
|
use logging::TimeLatch;
|
||||||
use slog::{debug, o, trace};
|
use slog::{crit, debug, o, trace};
|
||||||
use slog::{error, warn};
|
use slog::{error, warn};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
||||||
@@ -486,14 +486,16 @@ impl<T: BeaconChainTypes> Router<T> {
|
|||||||
| SyncId::SingleBlob { .. }
|
| SyncId::SingleBlob { .. }
|
||||||
| SyncId::ParentLookup { .. }
|
| SyncId::ParentLookup { .. }
|
||||||
| SyncId::ParentLookupBlob { .. } => {
|
| SyncId::ParentLookupBlob { .. } => {
|
||||||
unreachable!("Block lookups do not request BBRange requests")
|
crit!(self.log, "Block lookups do not request BBRange requests"; "peer_id" => %peer_id);
|
||||||
}
|
}
|
||||||
id @ (SyncId::BackFillBlocks { .. }
|
id @ (SyncId::BackFillBlocks { .. }
|
||||||
| SyncId::RangeBlocks { .. }
|
| SyncId::RangeBlocks { .. }
|
||||||
| SyncId::BackFillBlockAndBlobs { .. }
|
| SyncId::BackFillBlockAndBlobs { .. }
|
||||||
| SyncId::RangeBlockAndBlobs { .. }) => id,
|
| SyncId::RangeBlockAndBlobs { .. }) => id,
|
||||||
},
|
},
|
||||||
RequestId::Router => unreachable!("All BBRange requests belong to sync"),
|
RequestId::Router => {
|
||||||
|
crit!(self.log, "All BBRange requests belong to sync"; "peer_id" => %peer_id)
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
trace!(
|
trace!(
|
||||||
@@ -551,13 +553,15 @@ impl<T: BeaconChainTypes> Router<T> {
|
|||||||
| SyncId::RangeBlocks { .. }
|
| SyncId::RangeBlocks { .. }
|
||||||
| SyncId::RangeBlockAndBlobs { .. }
|
| SyncId::RangeBlockAndBlobs { .. }
|
||||||
| SyncId::BackFillBlockAndBlobs { .. } => {
|
| SyncId::BackFillBlockAndBlobs { .. } => {
|
||||||
unreachable!("Batch syncing do not request BBRoot requests")
|
crit!(self.log, "Batch syncing do not request BBRoot requests"; "peer_id" => %peer_id)
|
||||||
}
|
}
|
||||||
SyncId::SingleBlob { .. } | SyncId::ParentLookupBlob { .. } => {
|
SyncId::SingleBlob { .. } | SyncId::ParentLookupBlob { .. } => {
|
||||||
unreachable!("Blob response to block by roots request")
|
crit!(self.log, "Blob response to block by roots request"; "peer_id" => %peer_id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
RequestId::Router => unreachable!("All BBRoot requests belong to sync"),
|
RequestId::Router => {
|
||||||
|
crit!(self.log, "All BBRoot requests belong to sync"; "peer_id" => %peer_id)
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
trace!(
|
trace!(
|
||||||
@@ -584,16 +588,18 @@ impl<T: BeaconChainTypes> Router<T> {
|
|||||||
RequestId::Sync(sync_id) => match sync_id {
|
RequestId::Sync(sync_id) => match sync_id {
|
||||||
id @ (SyncId::SingleBlob { .. } | SyncId::ParentLookupBlob { .. }) => id,
|
id @ (SyncId::SingleBlob { .. } | SyncId::ParentLookupBlob { .. }) => id,
|
||||||
SyncId::SingleBlock { .. } | SyncId::ParentLookup { .. } => {
|
SyncId::SingleBlock { .. } | SyncId::ParentLookup { .. } => {
|
||||||
unreachable!("Block response to blobs by roots request")
|
crit!(self.log, "Block response to blobs by roots request"; "peer_id" => %peer_id)
|
||||||
}
|
}
|
||||||
SyncId::BackFillBlocks { .. }
|
SyncId::BackFillBlocks { .. }
|
||||||
| SyncId::RangeBlocks { .. }
|
| SyncId::RangeBlocks { .. }
|
||||||
| SyncId::RangeBlockAndBlobs { .. }
|
| SyncId::RangeBlockAndBlobs { .. }
|
||||||
| SyncId::BackFillBlockAndBlobs { .. } => {
|
| SyncId::BackFillBlockAndBlobs { .. } => {
|
||||||
unreachable!("Batch syncing does not request BBRoot requests")
|
crit!(self.log, "Batch syncing does not request BBRoot requests"; "peer_id" => %peer_id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
RequestId::Router => unreachable!("All BlobsByRoot requests belong to sync"),
|
RequestId::Router => {
|
||||||
|
crit!(self.log, "All BlobsByRoot requests belong to sync"; "peer_id" => %peer_id)
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
trace!(
|
trace!(
|
||||||
|
|||||||
Reference in New Issue
Block a user