Trait cfx_rpc::traits::Filterable
source · pub trait Filterable {
// Required methods
fn best_executed_epoch_number(&self) -> u64;
fn block_hashes(&self, epoch_num: EpochNumber) -> Option<Vec<H256>>;
fn pending_transaction_hashes(&self) -> BTreeSet<H256>;
fn logs(&self, filter: LogFilter) -> RpcResult<Vec<Log>>;
fn logs_for_epoch(
&self,
filter: &LogFilter,
epoch: (u64, Vec<H256>),
removed: bool
) -> RpcResult<Vec<Log>>;
fn polls(&self) -> &Mutex<PollManager<SyncPollFilter<Log>>>;
fn consensus_graph(&self) -> &ConsensusGraph;
fn shared_consensus_graph(&self) -> SharedConsensusGraph;
fn get_logs_filter_max_limit(&self) -> Option<usize>;
fn epochs_since_last_request(
&self,
last_epoch_number: u64,
recent_reported_epochs: &VecDeque<(u64, Vec<H256>)>
) -> RpcResult<(u64, Vec<(u64, Vec<H256>)>)>;
fn into_primitive_filter(
&self,
filter: EthRpcLogFilter
) -> RpcResult<LogFilter>;
}
Required Methods§
sourcefn best_executed_epoch_number(&self) -> u64
fn best_executed_epoch_number(&self) -> u64
Current best epoch number.
sourcefn block_hashes(&self, epoch_num: EpochNumber) -> Option<Vec<H256>>
fn block_hashes(&self, epoch_num: EpochNumber) -> Option<Vec<H256>>
Get a block hash by block id.
sourcefn pending_transaction_hashes(&self) -> BTreeSet<H256>
fn pending_transaction_hashes(&self) -> BTreeSet<H256>
pending transaction hashes at the given block (unordered).
sourcefn logs_for_epoch(
&self,
filter: &LogFilter,
epoch: (u64, Vec<H256>),
removed: bool
) -> RpcResult<Vec<Log>>
fn logs_for_epoch( &self, filter: &LogFilter, epoch: (u64, Vec<H256>), removed: bool ) -> RpcResult<Vec<Log>>
Get logs that match the given filter for specific epoch
sourcefn polls(&self) -> &Mutex<PollManager<SyncPollFilter<Log>>>
fn polls(&self) -> &Mutex<PollManager<SyncPollFilter<Log>>>
Get a reference to the poll manager.
sourcefn consensus_graph(&self) -> &ConsensusGraph
fn consensus_graph(&self) -> &ConsensusGraph
Get a reference to ConsensusGraph
Get a clone of SharedConsensusGraph
sourcefn get_logs_filter_max_limit(&self) -> Option<usize>
fn get_logs_filter_max_limit(&self) -> Option<usize>
Get logs limitation
sourcefn epochs_since_last_request(
&self,
last_epoch_number: u64,
recent_reported_epochs: &VecDeque<(u64, Vec<H256>)>
) -> RpcResult<(u64, Vec<(u64, Vec<H256>)>)>
fn epochs_since_last_request( &self, last_epoch_number: u64, recent_reported_epochs: &VecDeque<(u64, Vec<H256>)> ) -> RpcResult<(u64, Vec<(u64, Vec<H256>)>)>
Get epochs since last query