Trait fuel_core_txpool::ports::PeerToPeer

source ·
pub trait PeerToPeer: Send + Sync {
    type GossipedTransaction: NetworkData<Transaction>;

    // Required methods
    fn broadcast_transaction(&self, transaction: Arc<Transaction>) -> Result<()>;
    fn gossiped_transaction_events(
        &self,
    ) -> BoxStream<Self::GossipedTransaction>;
    fn notify_gossip_transaction_validity(
        &self,
        message_info: GossipsubMessageInfo,
        validity: GossipsubMessageAcceptance,
    ) -> Result<()>;
}

Required Associated Types§

Required Methods§

source

fn broadcast_transaction(&self, transaction: Arc<Transaction>) -> Result<()>

source

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

Creates a stream of next transactions gossiped from the network.

source

fn notify_gossip_transaction_validity( &self, message_info: GossipsubMessageInfo, validity: GossipsubMessageAcceptance, ) -> Result<()>

Implementors§