pub enum SyncAction {
ProcessBlock(Block),
ProcessTransaction(Transaction),
AcceptedTransaction {
tx: Transaction,
from_peer: u64,
},
SendMessage(u64, NetworkMessage),
DisconnectPeer(u64),
}Expand description
Actions that the infrastructure layer should take after processing events.
Variants§
ProcessBlock(Block)
Store and validate this block
ProcessTransaction(Transaction)
Submit this transaction to the mempool (fallback — mempool rejected it)
AcceptedTransaction
Transaction was accepted into the mempool and should be relayed to peers
Fields
§
tx: TransactionThe accepted transaction
SendMessage(u64, NetworkMessage)
Send a message to a specific peer
DisconnectPeer(u64)
Disconnect a peer
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SyncAction
impl RefUnwindSafe for SyncAction
impl Send for SyncAction
impl Sync for SyncAction
impl Unpin for SyncAction
impl UnsafeUnpin for SyncAction
impl UnwindSafe for SyncAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more