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§
sourcefn 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_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
sourcefn 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,
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