fuel_core_txpool::ports

Trait P2PSubscriptions

source
pub trait P2PSubscriptions {
    type GossipedTransaction: NetworkData<Transaction>;

    // Required methods
    fn subscribe_new_peers(&self) -> BoxStream<PeerId>;
    fn gossiped_transaction_events(
        &self,
    ) -> BoxStream<Self::GossipedTransaction>;
}

Required Associated Types§

Required Methods§

source

fn subscribe_new_peers(&self) -> BoxStream<PeerId>

Creates a stream that is filled with the peer_id when they subscribe to our transactions gossip.

source

fn gossiped_transaction_events(&self) -> BoxStream<Self::GossipedTransaction>

Creates a stream of next transactions gossiped from the network.

Implementors§