mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Update serai-message-queue to the new serai-primitives
This commit is contained in:
@@ -7,7 +7,7 @@ use dalek_ff_group::Ristretto;
|
||||
pub(crate) use ciphersuite::{group::GroupEncoding, Ciphersuite};
|
||||
pub(crate) use schnorr_signatures::SchnorrSignature;
|
||||
|
||||
pub(crate) use serai_primitives::ExternalNetworkId;
|
||||
pub(crate) use serai_primitives::network_id::ExternalNetworkId;
|
||||
|
||||
pub(crate) use tokio::{
|
||||
io::{AsyncReadExt, AsyncWriteExt},
|
||||
@@ -198,7 +198,7 @@ async fn main() {
|
||||
KEYS.write().unwrap().insert(service, key);
|
||||
let mut queues = QUEUES.write().unwrap();
|
||||
if service == Service::Coordinator {
|
||||
for network in serai_primitives::EXTERNAL_NETWORKS {
|
||||
for network in ExternalNetworkId::all() {
|
||||
queues.insert(
|
||||
(service, Service::Processor(network)),
|
||||
RwLock::new(Queue(db.clone(), service, Service::Processor(network))),
|
||||
@@ -213,12 +213,13 @@ async fn main() {
|
||||
};
|
||||
|
||||
// Make queues for each ExternalNetworkId
|
||||
for network in serai_primitives::EXTERNAL_NETWORKS {
|
||||
for network in ExternalNetworkId::all() {
|
||||
// Use a match so we error if the list of NetworkIds changes
|
||||
let Some(key) = read_key(match network {
|
||||
ExternalNetworkId::Bitcoin => "BITCOIN_KEY",
|
||||
ExternalNetworkId::Ethereum => "ETHEREUM_KEY",
|
||||
ExternalNetworkId::Monero => "MONERO_KEY",
|
||||
_ => panic!("unrecognized network"),
|
||||
}) else {
|
||||
continue;
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ use ciphersuite::{group::GroupEncoding, Ciphersuite};
|
||||
|
||||
use borsh::{BorshSerialize, BorshDeserialize};
|
||||
|
||||
use serai_primitives::ExternalNetworkId;
|
||||
use serai_primitives::network_id::ExternalNetworkId;
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, BorshSerialize, BorshDeserialize)]
|
||||
pub enum Service {
|
||||
|
||||
Reference in New Issue
Block a user