pub enum PeerMessages {
NewBlock(BlockHash),
Block(Block),
Headers(Vec<Header>),
Addr(Vec<AddrV2Message>),
Ready(Version),
Disconnected(usize),
NotFound(Inventory),
Transaction(Transaction),
UtreexoState(Vec<u8>),
BlockFilter((BlockHash, BlockFilter)),
UtreexoProof(UtreexoProof),
}Expand description
Messages passed from different modules to the main node to process. They should minimal and only if it requires global states, everything else should be handled by the module itself.
Variants§
NewBlock(BlockHash)
A new block just arrived, we should ask for it and update our chain
Block(Block)
We got a full block from our peer, presumptively we asked for it
Headers(Vec<Header>)
A response to a getheaders request
Addr(Vec<AddrV2Message>)
We got some p2p addresses, add this to our local database
Ready(Version)
Peer notify its readiness
Disconnected(usize)
Remote peer disconnected
NotFound(Inventory)
Remote peer doesn’t know the data we asked for
Transaction(Transaction)
Remote peer sent us a transaction
UtreexoState(Vec<u8>)
Remote peer sent us a Utreexo state
BlockFilter((BlockHash, BlockFilter))
Remote peer sent us a compact block filter
UtreexoProof(UtreexoProof)
Remote peer sent us a Utreexo proof,
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PeerMessages
impl RefUnwindSafe for PeerMessages
impl Send for PeerMessages
impl Sync for PeerMessages
impl Unpin for PeerMessages
impl UnwindSafe for PeerMessages
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