p2p/channels/transaction/
mod.rs

1mod p2p_channels_transaction_state;
2pub use p2p_channels_transaction_state::*;
3
4mod p2p_channels_transaction_actions;
5pub use p2p_channels_transaction_actions::*;
6
7mod p2p_channels_transaction_reducer;
8
9use binprot_derive::{BinProtRead, BinProtWrite};
10pub use openmina_core::transaction::{Transaction, TransactionHash, TransactionInfo};
11use serde::{Deserialize, Serialize};
12
13#[derive(BinProtWrite, BinProtRead, Serialize, Deserialize, Debug, Clone)]
14pub enum TransactionPropagationChannelMsg {
15    /// Request next transactions upto the `limit`.
16    ///
17    /// - Must not be sent until peer sends `WillSend` message for the
18    ///   previous request and until peer has fulfilled it.
19    GetNext { limit: u8 },
20    /// Amount of transactions which will proceed this message.
21    ///
22    /// - Can only be sent, if peer has sent `GetNext` and we haven't
23    ///   responded with `WillSend` yet.
24    /// - Can't be bigger than limit set by `GetNext`.
25    /// - Amount of promised transactions must be delivered.
26    WillSend { count: u8 },
27    /// Transaction.
28    Transaction(TransactionInfo),
29}