diff --git a/broadcast/src/buffered/engine.rs b/broadcast/src/buffered/engine.rs index 8741d0ed99..8d5c6b0bda 100644 --- a/broadcast/src/buffered/engine.rs +++ b/broadcast/src/buffered/engine.rs @@ -15,7 +15,7 @@ use futures::{ channel::{mpsc, oneshot}, StreamExt, }; -use std::collections::{HashMap, VecDeque}; +use std::collections::{BTreeMap, VecDeque}; use tracing::{debug, error, trace, warn}; /// A responder waiting for a message. @@ -76,7 +76,7 @@ pub struct Engine>>, + waiters: BTreeMap>>, //////////////////////////////////////// // Cache @@ -85,7 +85,7 @@ pub struct Engine>, + items: BTreeMap>, /// A LRU cache of the latest received identities and digests from each peer. /// @@ -93,13 +93,13 @@ pub struct Engine>>, + deques: BTreeMap>>, /// The number of times each digest (globally unique) exists in one of the deques. /// /// Multiple peers can send the same message and we only want to store /// the message once. - counts: HashMap, + counts: BTreeMap, //////////////////////////////////////// // Metrics @@ -125,10 +125,10 @@ impl