Merge branch 'unstable' into electra-focil

This commit is contained in:
jacobkaufmann
2024-12-26 12:54:09 -05:00
230 changed files with 3831 additions and 3317 deletions

View File

@@ -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.

View File

@@ -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)))