mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 12:47:05 +00:00
Merge branch 'unstable' into electra-focil
This commit is contained in:
@@ -964,6 +964,9 @@ where
|
||||
request_info: (Id, RequestType<E>),
|
||||
error: StreamUpgradeError<RPCError>,
|
||||
) {
|
||||
// This dialing is now considered failed
|
||||
self.dial_negotiated -= 1;
|
||||
|
||||
let (id, req) = request_info;
|
||||
|
||||
// map the error
|
||||
@@ -989,9 +992,6 @@ where
|
||||
StreamUpgradeError::Apply(other) => other,
|
||||
};
|
||||
|
||||
// This dialing is now considered failed
|
||||
self.dial_negotiated -= 1;
|
||||
|
||||
self.outbound_io_error_retries = 0;
|
||||
self.events_out
|
||||
.push(HandlerEvent::Err(HandlerErr::Outbound {
|
||||
|
||||
@@ -67,7 +67,6 @@ pub struct SamplingRequestId(pub usize);
|
||||
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct CustodyId {
|
||||
pub requester: CustodyRequester,
|
||||
pub req_id: Id,
|
||||
}
|
||||
|
||||
/// Downstream components that perform custody by root requests.
|
||||
|
||||
@@ -251,18 +251,17 @@ impl futures::stream::Stream for GossipCache {
|
||||
Poll::Ready(Some(expired)) => {
|
||||
let expected_key = expired.key();
|
||||
let (topic, data) = expired.into_inner();
|
||||
match self.topic_msgs.get_mut(&topic) {
|
||||
Some(msgs) => {
|
||||
let key = msgs.remove(&data);
|
||||
debug_assert_eq!(key, Some(expected_key));
|
||||
if msgs.is_empty() {
|
||||
// no more messages for this topic.
|
||||
self.topic_msgs.remove(&topic);
|
||||
}
|
||||
}
|
||||
None => {
|
||||
#[cfg(debug_assertions)]
|
||||
panic!("Topic for registered message is not present.")
|
||||
let topic_msg = self.topic_msgs.get_mut(&topic);
|
||||
debug_assert!(
|
||||
topic_msg.is_some(),
|
||||
"Topic for registered message is not present."
|
||||
);
|
||||
if let Some(msgs) = topic_msg {
|
||||
let key = msgs.remove(&data);
|
||||
debug_assert_eq!(key, Some(expected_key));
|
||||
if msgs.is_empty() {
|
||||
// no more messages for this topic.
|
||||
self.topic_msgs.remove(&topic);
|
||||
}
|
||||
}
|
||||
Poll::Ready(Some(Ok(topic)))
|
||||
|
||||
Reference in New Issue
Block a user