Remove the "expected" next ID

It's an unnecessary extra layer better handled locally.
This commit is contained in:
Luke Parker
2023-09-27 11:10:12 -04:00
parent 90318d7214
commit 269db1c4be
6 changed files with 12 additions and 18 deletions

View File

@@ -25,8 +25,7 @@ impl Coordinator for MessageQueue {
}
async fn recv(&mut self) -> Message {
// TODO2: Use a proper expected next ID
let msg = self.next(0).await;
let msg = self.next().await;
let id = msg.id;

View File

@@ -471,6 +471,7 @@ async fn run<N: Network, D: Db, Co: Coordinator>(mut raw_db: D, network: N, mut
let (main_db, mut tributary_mutable, mut substrate_mutable) = boot(&mut raw_db, &network).await;
// We can't load this from the DB as we can't guarantee atomic increments with the ack function
// TODO: Load with a slight tolerance
let mut last_coordinator_msg = None;
loop {