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§
fn broadcast_transaction(&self, transaction: Arc<Transaction>) -> Result<()>
sourcefn gossiped_transaction_events(&self) -> BoxStream<Self::GossipedTransaction>
fn gossiped_transaction_events(&self) -> BoxStream<Self::GossipedTransaction>
Creates a stream of next transactions gossiped from the network.