Note better message structure in messages

This commit is contained in:
Luke Parker 2024-09-11 08:57:57 -04:00
parent 73af09effb
commit 723f529659

View file

@ -181,6 +181,24 @@ pub mod coordinator {
pub mod substrate { pub mod substrate {
use super::*; use super::*;
/* TODO
#[derive(Clone, PartialEq, Eq, Debug, BorshSerialize, BorshDeserialize)]
pub enum InInstructionResult {
Succeeded,
Failed,
}
#[derive(Clone, PartialEq, Eq, Debug, BorshSerialize, BorshDeserialize)]
pub struct ExecutedBatch {
batch_id: u32,
in_instructions: Vec<InInstructionResult>,
}
Block {
block: u64,
batches: Vec<ExecutedBatch>,
burns: Vec<OutInstructionWithBalance>,
}
*/
#[derive(Clone, PartialEq, Eq, Debug, BorshSerialize, BorshDeserialize)] #[derive(Clone, PartialEq, Eq, Debug, BorshSerialize, BorshDeserialize)]
pub enum CoordinatorMessage { pub enum CoordinatorMessage {
/// Keys set on the Serai blockchain. /// Keys set on the Serai blockchain.
@ -193,7 +211,6 @@ pub mod substrate {
batch_id: u32, batch_id: u32,
in_instruction_succeededs: Vec<bool>, in_instruction_succeededs: Vec<bool>,
burns: Vec<OutInstructionWithBalance>, burns: Vec<OutInstructionWithBalance>,
key_to_activate: Option<KeyPair>,
}, },
/// The data from a block which didn't acknowledge a Batch. /// The data from a block which didn't acknowledge a Batch.
BlockWithoutBatchAcknowledgement { block: u64, burns: Vec<OutInstructionWithBalance> }, BlockWithoutBatchAcknowledgement { block: u64, burns: Vec<OutInstructionWithBalance> },