mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-30 01:28:21 -05:00
chore: move Filter to rpc-types (#2648)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,6 @@ mod chain;
|
||||
mod checkpoints;
|
||||
pub mod constants;
|
||||
pub mod contract;
|
||||
pub mod filter;
|
||||
mod forkid;
|
||||
mod genesis;
|
||||
mod hardfork;
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
|
||||
use reth_primitives::{
|
||||
filter::Filter, Address, BlockHash, BlockId, BlockNumberOrTag, Bytes, H256, U256, U64,
|
||||
};
|
||||
use reth_primitives::{Address, BlockHash, BlockId, BlockNumberOrTag, Bytes, H256, U256, U64};
|
||||
use reth_rpc_types::{
|
||||
engine::{
|
||||
ExecutionPayload, ExecutionPayloadBodies, ExecutionPayloadEnvelope, ForkchoiceState,
|
||||
ForkchoiceUpdated, PayloadAttributes, PayloadId, PayloadStatus, TransitionConfiguration,
|
||||
},
|
||||
state::StateOverride,
|
||||
CallRequest, Log, RichBlock, SyncStatus,
|
||||
CallRequest, Filter, Log, RichBlock, SyncStatus,
|
||||
};
|
||||
|
||||
#[cfg_attr(not(feature = "client"), rpc(server))]
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
|
||||
use reth_primitives::filter::Filter;
|
||||
use reth_rpc_types::{FilterChanges, FilterId, Log};
|
||||
use reth_rpc_types::{Filter, FilterChanges, FilterId, Log};
|
||||
|
||||
/// Rpc Interface for poll-based ethereum filter API.
|
||||
#[cfg_attr(not(feature = "client"), rpc(server))]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
//! Ethereum types for pub-sub
|
||||
|
||||
use crate::{Log, RichHeader};
|
||||
use reth_primitives::{filter::Filter, H256};
|
||||
use crate::{eth::Filter, Log, RichHeader};
|
||||
use reth_primitives::H256;
|
||||
use serde::{de::Error, Deserialize, Deserializer, Serialize, Serializer};
|
||||
|
||||
/// Subscription result.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use jsonrpsee::core::RpcResult as Result;
|
||||
use reth_primitives::{filter::Filter, Address, BlockId, BlockNumberOrTag, Bytes, H256, U256, U64};
|
||||
use reth_primitives::{Address, BlockId, BlockNumberOrTag, Bytes, H256, U256, U64};
|
||||
use reth_rpc_api::{EngineEthApiServer, EthApiServer, EthFilterApiServer};
|
||||
/// Re-export for convenience
|
||||
pub use reth_rpc_engine_api::EngineApi;
|
||||
use reth_rpc_types::{state::StateOverride, CallRequest, Log, RichBlock, SyncStatus};
|
||||
use reth_rpc_types::{state::StateOverride, CallRequest, Filter, Log, RichBlock, SyncStatus};
|
||||
use tracing_futures::Instrument;
|
||||
|
||||
macro_rules! engine_span {
|
||||
|
||||
@@ -9,13 +9,10 @@ use crate::{
|
||||
};
|
||||
use async_trait::async_trait;
|
||||
use jsonrpsee::{core::RpcResult, server::IdProvider};
|
||||
use reth_primitives::{
|
||||
filter::{Filter, FilterBlockOption, FilteredParams},
|
||||
Receipt, SealedBlock,
|
||||
};
|
||||
use reth_primitives::{Receipt, SealedBlock};
|
||||
use reth_provider::{BlockIdProvider, BlockProvider, EvmEnvProvider};
|
||||
use reth_rpc_api::EthFilterApiServer;
|
||||
use reth_rpc_types::{FilterChanges, FilterId, Log};
|
||||
use reth_rpc_types::{Filter, FilterBlockOption, FilterChanges, FilterId, FilteredParams, Log};
|
||||
use reth_transaction_pool::TransactionPool;
|
||||
use std::{collections::HashMap, iter::StepBy, ops::RangeInclusive, sync::Arc, time::Instant};
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use reth_primitives::{filter::FilteredParams, BlockNumHash, ChainInfo, Receipt, TxHash, U256};
|
||||
use reth_rpc_types::Log;
|
||||
use reth_primitives::{BlockNumHash, ChainInfo, Receipt, TxHash, U256};
|
||||
use reth_rpc_types::{FilteredParams, Log};
|
||||
|
||||
/// Returns all matching logs of a block's receipts grouped with the hash of their transaction.
|
||||
pub(crate) fn matching_block_logs<I>(
|
||||
@@ -97,7 +97,8 @@ pub(crate) fn get_filter_block_range(
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use reth_primitives::{filter::Filter, BlockNumberOrTag};
|
||||
use reth_primitives::BlockNumberOrTag;
|
||||
use reth_rpc_types::Filter;
|
||||
|
||||
#[test]
|
||||
fn test_log_range_from_and_to() {
|
||||
|
||||
@@ -3,9 +3,10 @@ use crate::eth::logs_utils;
|
||||
use futures::StreamExt;
|
||||
use jsonrpsee::{server::SubscriptionMessage, PendingSubscriptionSink, SubscriptionSink};
|
||||
use reth_network_api::NetworkInfo;
|
||||
use reth_primitives::{filter::FilteredParams, TxHash};
|
||||
use reth_primitives::TxHash;
|
||||
use reth_provider::{BlockProvider, CanonStateSubscriptions, EvmEnvProvider};
|
||||
use reth_rpc_api::EthPubSubApiServer;
|
||||
use reth_rpc_types::FilteredParams;
|
||||
|
||||
use reth_rpc_types::{
|
||||
pubsub::{
|
||||
|
||||
Reference in New Issue
Block a user