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§

source

fn best_executed_epoch_number(&self) -> u64

Current best epoch number.

source

fn block_hashes(&self, epoch_num: EpochNumber) -> Option<Vec<H256>>

Get a block hash by block id.

source

fn pending_transaction_hashes(&self) -> BTreeSet<H256>

pending transaction hashes at the given block (unordered).

source

fn logs(&self, filter: LogFilter) -> JsonRpcResult<Vec<Log>>

Get logs that match the given filter.

source

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

source

fn polls(&self) -> &Mutex<PollManager<SyncPollFilter<Log>>>

Get a reference to the poll manager.

source

fn consensus_graph(&self) -> &ConsensusGraph

Get a reference to ConsensusGraph

source

fn shared_consensus_graph(&self) -> SharedConsensusGraph

Get a clone of SharedConsensusGraph

source

fn get_logs_filter_max_limit(&self) -> Option<usize>

Get logs limitation

source

fn epochs_since_last_request( &self, last_epoch_number: u64, recent_reported_epochs: &VecDeque<(u64, Vec<H256>)> ) -> JsonRpcResult<(u64, Vec<(u64, Vec<H256>)>)>

Get epochs since last query

Implementors§