pub trait NotifyP2P {
// Required methods
fn broadcast_transaction(&self, transaction: Arc<Transaction>) -> Result<()>;
fn notify_gossip_transaction_validity(
&self,
message_info: GossipsubMessageInfo,
validity: GossipsubMessageAcceptance,
) -> Result<()>;
}
Required Methods§
sourcefn broadcast_transaction(&self, transaction: Arc<Transaction>) -> Result<()>
fn broadcast_transaction(&self, transaction: Arc<Transaction>) -> Result<()>
Gossip broadcast a transaction inserted via API.
sourcefn notify_gossip_transaction_validity(
&self,
message_info: GossipsubMessageInfo,
validity: GossipsubMessageAcceptance,
) -> Result<()>
fn notify_gossip_transaction_validity( &self, message_info: GossipsubMessageInfo, validity: GossipsubMessageAcceptance, ) -> Result<()>
Report the validity of a transaction received from the network.