From a05961974a3bb0c43e7f39fe8fda59af587c8104 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Mon, 17 Jul 2023 18:11:21 -0400 Subject: [PATCH] Lint a couple TODOs in the processor --- processor/src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/processor/src/main.rs b/processor/src/main.rs index 8d5379f2..06621108 100644 --- a/processor/src/main.rs +++ b/processor/src/main.rs @@ -301,12 +301,11 @@ async fn handle_coordinator_msg( } // TODO: Shouldn't we create a txn here and pass it around as needed? - // The txn would ack this message ID. If we detect this mesage ID as handled in the DB, + // The txn would ack this message ID. If we detect this message ID as handled in the DB, // we'd move on here. Only after committing the TX would we report it as acked. match msg.msg.clone() { CoordinatorMessage::KeyGen(msg) => { - // TODO: This may be fired multiple times. What's our plan for that? coordinator .send(ProcessorMessage::KeyGen(tributary_mutable.key_gen.handle(txn, msg).await)) .await; @@ -393,6 +392,8 @@ async fn handle_coordinator_msg( key: key_vec, burns, } => { + assert_eq!(network, C::NETWORK); + let mut block_id = >::Id::default(); block_id.as_mut().copy_from_slice(&context.coin_latest_finalized_block.0); @@ -414,8 +415,7 @@ async fn handle_coordinator_msg( instruction: OutInstruction { address, data }, balance, } = out; - // TODO: Check network is this coin's network - assert_eq!(balance.coin.network(), network); + assert_eq!(balance.coin.network(), C::NETWORK); if let Ok(address) = C::Address::try_from(address.consume()) { // TODO: Add coin to payment