Define an array of all NetworkIds in serai_primitives

This commit is contained in:
Luke Parker
2023-10-12 23:59:21 -04:00
parent b7746aa71d
commit 6a4c57e86f
6 changed files with 20 additions and 14 deletions

View File

@@ -987,7 +987,10 @@ pub async fn handle_processors<D: Db, Pro: Processors, P: P2p>(
mut new_tributary: broadcast::Receiver<ActiveTributary<D, P>>,
) {
let mut channels = HashMap::new();
for network in [NetworkId::Bitcoin, NetworkId::Ethereum, NetworkId::Monero] {
for network in serai_client::primitives::NETWORKS {
if network == NetworkId::Serai {
continue;
}
let (send, recv) = mpsc::unbounded_channel();
tokio::spawn(handle_processor_messages(
db.clone(),