reth_network_p2p/snap/
client.rs1use crate::{download::DownloadClient, error::PeerRequestResult, priority::Priority};
2use futures::Future;
3use reth_eth_wire_types::snap::{AccountRangeMessage, GetAccountRangeMessage};
4
5#[auto_impl::auto_impl(&, Arc, Box)]
7pub trait SnapClient: DownloadClient {
8 type Output: Future<Output = PeerRequestResult<AccountRangeMessage>> + Send + Sync + Unpin;
10
11 fn get_account_range(&self, request: GetAccountRangeMessage) -> Self::Output {
14 self.get_account_range_with_priority(request, Priority::Normal)
15 }
16
17 fn get_account_range_with_priority(
20 &self,
21 request: GetAccountRangeMessage,
22 priority: Priority,
23 ) -> Self::Output;
24}