moved filter logic from rpc module to ethcore

This commit is contained in:
debris
2016-02-17 14:13:51 +01:00
parent 5826a34ebb
commit c74c016ce2
8 changed files with 88 additions and 125 deletions

View File

@@ -33,7 +33,7 @@ use env_info::LastHashes;
use verification::*;
use block::*;
use transaction::LocalizedTransaction;
use extras::{TransactionAddress, BlockReceipts};
use extras::TransactionAddress;
use filter::Filter;
use log_entry::LocalizedLogEntry;
pub use blockchain::TreeRoute;
@@ -512,7 +512,7 @@ impl BlockChainClient for Client {
block_number: number as usize,
transaction_hash: H256::new(),
transaction_index: index,
log_index: log_index
log_index: log_index + i
})
.collect::<Vec<LocalizedLogEntry>>()
})

View File

@@ -14,12 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
//! Blockchain filter
use util::hash::*;
use util::sha3::*;
use client::BlockId;
use log_entry::LogEntry;
/// Blockchain log filter data.
/// Blockchain Filter.
pub struct Filter {
/// Blockchain will be searched from this block.
pub from_block: BlockId,

View File

@@ -102,8 +102,10 @@ pub mod block_queue;
pub mod client;
pub mod error;
pub mod ethereum;
pub mod filter;
pub mod header;
pub mod service;
pub mod log_entry;
pub mod spec;
pub mod transaction;
pub mod views;
@@ -112,7 +114,6 @@ pub mod receipt;
mod common;
mod basic_types;
#[macro_use] mod evm;
mod log_entry;
mod env_info;
mod pod_account;
mod pod_state;
@@ -131,7 +132,6 @@ mod substate;
mod executive;
mod externalities;
mod verification;
mod filter;
#[cfg(test)]
mod tests;

View File

@@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
//! Block log.
use util::*;
use basic_types::LogBloom;