fuel_core_txpool::ports

Trait P2PRequests

source
pub trait P2PRequests:
    NotifyP2P
    + Send
    + Sync
    + 'static {
    // Required methods
    fn request_tx_ids<'life0, 'async_trait>(
        &'life0 self,
        peer_id: PeerId,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<TxId>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn request_txs<'life0, 'async_trait>(
        &'life0 self,
        peer_id: PeerId,
        tx_ids: Vec<TxId>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<Transaction>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn request_tx_ids<'life0, 'async_trait>( &'life0 self, peer_id: PeerId, ) -> Pin<Box<dyn Future<Output = Result<Vec<TxId>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Asks the network to gather all tx ids of a specific peer

source

fn request_txs<'life0, 'async_trait>( &'life0 self, peer_id: PeerId, tx_ids: Vec<TxId>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<Transaction>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Asks the network to gather specific transactions from a specific peer

Implementors§