diff --git a/processor/messages/src/lib.rs b/processor/messages/src/lib.rs index b07f79a0..73b187c1 100644 --- a/processor/messages/src/lib.rs +++ b/processor/messages/src/lib.rs @@ -134,6 +134,7 @@ pub mod coordinator { #[derive(Clone, PartialEq, Eq, Debug, Zeroize, Serialize, Deserialize)] pub enum ProcessorMessage { + SubstrateBlockAck { block: u64, plans: Vec<[u8; 32]> }, BatchPreprocess { id: SignId, preprocess: Vec }, BatchShare { id: SignId, share: [u8; 32] }, } @@ -151,6 +152,7 @@ pub mod substrate { }, SubstrateBlock { context: SubstrateContext, + block: u64, key: Vec, burns: Vec, }, diff --git a/processor/src/main.rs b/processor/src/main.rs index 79362116..d39ea9cb 100644 --- a/processor/src/main.rs +++ b/processor/src/main.rs @@ -383,6 +383,7 @@ async fn handle_coordinator_msg( messages::substrate::CoordinatorMessage::SubstrateBlock { context, + block, key: key_vec, burns, } => { @@ -422,6 +423,15 @@ async fn handle_coordinator_msg( .expect("key we don't have a scheduler for acknowledged a block") .schedule(outputs, payments); + coordinator + .send(ProcessorMessage::Coordinator( + messages::coordinator::ProcessorMessage::SubstrateBlockAck { + block, + plans: plans.iter().map(|plan| plan.id()).collect(), + }, + )) + .await; + sign_plans( txn, coin,