mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 20:59:23 +00:00
Remove the "expected" next ID
It's an unnecessary extra layer better handled locally.
This commit is contained in:
@@ -140,9 +140,9 @@ impl MessageQueue {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn next(&self, expected: u64) -> QueuedMessage {
|
||||
pub async fn next(&self) -> QueuedMessage {
|
||||
loop {
|
||||
let json = self.json_call("next", serde_json::json!([self.service, expected])).await;
|
||||
let json = self.json_call("next", serde_json::json!([self.service])).await;
|
||||
|
||||
// Convert from a Value to a type via reserialization
|
||||
let msg: Option<QueuedMessage> = serde_json::from_str(
|
||||
@@ -174,7 +174,6 @@ impl MessageQueue {
|
||||
);
|
||||
}
|
||||
// TODO: Verify the sender's signature
|
||||
// TODO: Check the ID is sane
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user