mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Use dedicated Queues for each from-to pair
Prevents one Processor's message from halting the entire pipeline.
This commit is contained in:
@@ -15,14 +15,14 @@ impl<D: Db> MainDb<D> {
|
||||
D::key(b"coordinator_main", dst, key)
|
||||
}
|
||||
|
||||
fn handled_message_key(id: u64) -> Vec<u8> {
|
||||
Self::main_key(b"handled_message", id.to_le_bytes())
|
||||
fn handled_message_key(network: NetworkId, id: u64) -> Vec<u8> {
|
||||
Self::main_key(b"handled_message", (network, id).encode())
|
||||
}
|
||||
pub fn save_handled_message(txn: &mut D::Transaction<'_>, id: u64) {
|
||||
txn.put(Self::handled_message_key(id), []);
|
||||
pub fn save_handled_message(txn: &mut D::Transaction<'_>, network: NetworkId, id: u64) {
|
||||
txn.put(Self::handled_message_key(network, id), []);
|
||||
}
|
||||
pub fn handled_message<G: Get>(getter: &G, id: u64) -> bool {
|
||||
getter.get(Self::handled_message_key(id)).is_some()
|
||||
pub fn handled_message<G: Get>(getter: &G, network: NetworkId, id: u64) -> bool {
|
||||
getter.get(Self::handled_message_key(network, id)).is_some()
|
||||
}
|
||||
|
||||
fn acive_tributaries_key() -> Vec<u8> {
|
||||
|
||||
Reference in New Issue
Block a user