Trait client::rpc::impls::cfx::cfx_filter::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) -> JsonRpcResult<Vec<Log>>;
fn logs_for_epoch(
&self,
filter: &LogFilter,
epoch: (u64, Vec<H256>),
data_man: &Arc<BlockDataManager>
) -> JsonRpcResult<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>)>
) -> JsonRpcResult<(u64, Vec<(u64, Vec<H256>)>)>;
}
Expand description
Something which provides data that can be filtered over.
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(&self, filter: LogFilter) -> JsonRpcResult<Vec<Log>>
fn logs(&self, filter: LogFilter) -> JsonRpcResult<Vec<Log>>
Get logs that match the given filter.
sourcefn logs_for_epoch(
&self,
filter: &LogFilter,
epoch: (u64, Vec<H256>),
data_man: &Arc<BlockDataManager>
) -> JsonRpcResult<Vec<Log>>
fn logs_for_epoch( &self, filter: &LogFilter, epoch: (u64, Vec<H256>), data_man: &Arc<BlockDataManager> ) -> JsonRpcResult<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