2016-05-24 21:56:32 +02:00
|
|
|
//! Helper type with all filter state data.
|
2016-02-23 18:51:29 +01:00
|
|
|
|
2016-05-24 21:56:32 +02:00
|
|
|
use std::collections::HashSet;
|
2016-03-11 12:31:42 +01:00
|
|
|
use util::hash::H256;
|
2016-05-24 21:56:32 +02:00
|
|
|
use v1::types::{Filter, Log};
|
2016-02-23 18:51:29 +01:00
|
|
|
|
2016-03-11 12:31:42 +01:00
|
|
|
pub type BlockNumber = u64;
|
|
|
|
|
2016-05-24 21:56:32 +02:00
|
|
|
/// Filter state.
|
2016-02-23 18:51:29 +01:00
|
|
|
#[derive(Clone)]
|
|
|
|
pub enum PollFilter {
|
2016-05-24 21:56:32 +02:00
|
|
|
/// Number of last block which client was notified about.
|
2016-03-11 12:31:42 +01:00
|
|
|
Block(BlockNumber),
|
2016-05-24 21:56:32 +02:00
|
|
|
/// Hashes of all transactions which client was notified about.
|
2016-03-11 12:31:42 +01:00
|
|
|
PendingTransaction(Vec<H256>),
|
2016-05-24 21:56:32 +02:00
|
|
|
/// Number of From block number, pending logs and log filter iself.
|
|
|
|
Logs(BlockNumber, HashSet<Log>, Filter)
|
2016-02-23 18:51:29 +01:00
|
|
|
}
|