mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: rm reth-interfaces from provider (#8457)
This commit is contained in:
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -7723,15 +7723,17 @@ dependencies = [
|
|||||||
"reth-blockchain-tree-api",
|
"reth-blockchain-tree-api",
|
||||||
"reth-codecs",
|
"reth-codecs",
|
||||||
"reth-db",
|
"reth-db",
|
||||||
|
"reth-errors",
|
||||||
"reth-evm",
|
"reth-evm",
|
||||||
"reth-execution-types",
|
"reth-execution-types",
|
||||||
"reth-fs-util",
|
"reth-fs-util",
|
||||||
"reth-interfaces",
|
|
||||||
"reth-metrics",
|
"reth-metrics",
|
||||||
|
"reth-network-p2p",
|
||||||
"reth-nippy-jar",
|
"reth-nippy-jar",
|
||||||
"reth-primitives",
|
"reth-primitives",
|
||||||
"reth-storage-api",
|
"reth-storage-api",
|
||||||
"reth-storage-errors",
|
"reth-storage-errors",
|
||||||
|
"reth-testing-utils",
|
||||||
"reth-trie",
|
"reth-trie",
|
||||||
"revm",
|
"revm",
|
||||||
"strum",
|
"strum",
|
||||||
|
|||||||
@ -17,9 +17,10 @@ reth-blockchain-tree-api.workspace = true
|
|||||||
reth-execution-types.workspace = true
|
reth-execution-types.workspace = true
|
||||||
reth-primitives.workspace = true
|
reth-primitives.workspace = true
|
||||||
reth-fs-util.workspace = true
|
reth-fs-util.workspace = true
|
||||||
|
reth-errors.workspace = true
|
||||||
reth-storage-errors.workspace = true
|
reth-storage-errors.workspace = true
|
||||||
reth-interfaces.workspace = true
|
|
||||||
reth-storage-api.workspace = true
|
reth-storage-api.workspace = true
|
||||||
|
reth-network-p2p.workspace = true
|
||||||
reth-db.workspace = true
|
reth-db.workspace = true
|
||||||
reth-trie = { workspace = true, features = ["metrics"] }
|
reth-trie = { workspace = true, features = ["metrics"] }
|
||||||
reth-nippy-jar.workspace = true
|
reth-nippy-jar.workspace = true
|
||||||
@ -59,7 +60,7 @@ rayon.workspace = true
|
|||||||
reth-db = { workspace = true, features = ["test-utils"] }
|
reth-db = { workspace = true, features = ["test-utils"] }
|
||||||
reth-primitives = { workspace = true, features = ["arbitrary", "test-utils"] }
|
reth-primitives = { workspace = true, features = ["arbitrary", "test-utils"] }
|
||||||
reth-trie = { workspace = true, features = ["test-utils"] }
|
reth-trie = { workspace = true, features = ["test-utils"] }
|
||||||
reth-interfaces = { workspace = true, features = ["test-utils"] }
|
reth-testing-utils.workspace = true
|
||||||
|
|
||||||
alloy-rlp.workspace = true
|
alloy-rlp.workspace = true
|
||||||
parking_lot.workspace = true
|
parking_lot.workspace = true
|
||||||
|
|||||||
@ -12,8 +12,8 @@ use reth_db::{
|
|||||||
database::Database, init_db, mdbx::DatabaseArguments, models::StoredBlockBodyIndices,
|
database::Database, init_db, mdbx::DatabaseArguments, models::StoredBlockBodyIndices,
|
||||||
DatabaseEnv,
|
DatabaseEnv,
|
||||||
};
|
};
|
||||||
|
use reth_errors::{RethError, RethResult};
|
||||||
use reth_evm::ConfigureEvmEnv;
|
use reth_evm::ConfigureEvmEnv;
|
||||||
use reth_interfaces::{RethError, RethResult};
|
|
||||||
use reth_primitives::{
|
use reth_primitives::{
|
||||||
stage::{StageCheckpoint, StageId},
|
stage::{StageCheckpoint, StageId},
|
||||||
Address, Block, BlockHash, BlockHashOrNumber, BlockNumber, BlockWithSenders, ChainInfo,
|
Address, Block, BlockHash, BlockHashOrNumber, BlockNumber, BlockWithSenders, ChainInfo,
|
||||||
@ -599,15 +599,15 @@ mod tests {
|
|||||||
tables,
|
tables,
|
||||||
test_utils::{create_test_static_files_dir, ERROR_TEMPDIR},
|
test_utils::{create_test_static_files_dir, ERROR_TEMPDIR},
|
||||||
};
|
};
|
||||||
use reth_interfaces::test_utils::{
|
|
||||||
generators,
|
|
||||||
generators::{random_block, random_header},
|
|
||||||
};
|
|
||||||
use reth_primitives::{
|
use reth_primitives::{
|
||||||
hex_literal::hex, ChainSpecBuilder, PruneMode, PruneModes, SealedBlock, StaticFileSegment,
|
hex_literal::hex, ChainSpecBuilder, PruneMode, PruneModes, SealedBlock, StaticFileSegment,
|
||||||
TxNumber, B256, U256,
|
TxNumber, B256, U256,
|
||||||
};
|
};
|
||||||
use reth_storage_errors::provider::ProviderError;
|
use reth_storage_errors::provider::ProviderError;
|
||||||
|
use reth_testing_utils::{
|
||||||
|
generators,
|
||||||
|
generators::{random_block, random_header},
|
||||||
|
};
|
||||||
use std::{ops::RangeInclusive, sync::Arc};
|
use std::{ops::RangeInclusive, sync::Arc};
|
||||||
use tokio::sync::watch;
|
use tokio::sync::watch;
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@ use reth_db::{
|
|||||||
BlockNumberList, DatabaseError,
|
BlockNumberList, DatabaseError,
|
||||||
};
|
};
|
||||||
use reth_evm::ConfigureEvmEnv;
|
use reth_evm::ConfigureEvmEnv;
|
||||||
use reth_interfaces::p2p::headers::downloader::SyncTarget;
|
use reth_network_p2p::headers::downloader::SyncTarget;
|
||||||
use reth_primitives::{
|
use reth_primitives::{
|
||||||
keccak256,
|
keccak256,
|
||||||
revm::{config::revm_spec, env::fill_block_env},
|
revm::{config::revm_spec, env::fill_block_env},
|
||||||
|
|||||||
@ -65,8 +65,8 @@ mod tests {
|
|||||||
transaction::{DbTx, DbTxMut},
|
transaction::{DbTx, DbTxMut},
|
||||||
CanonicalHeaders, HeaderNumbers, HeaderTerminalDifficulties, Headers, RawTable,
|
CanonicalHeaders, HeaderNumbers, HeaderTerminalDifficulties, Headers, RawTable,
|
||||||
};
|
};
|
||||||
use reth_interfaces::test_utils::generators::{self, random_header_range};
|
|
||||||
use reth_primitives::{static_file::find_fixed_range, BlockNumber, B256, U256};
|
use reth_primitives::{static_file::find_fixed_range, BlockNumber, B256, U256};
|
||||||
|
use reth_testing_utils::generators::{self, random_header_range};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_snap() {
|
fn test_snap() {
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
use auto_impl::auto_impl;
|
use reth_network_p2p::headers::downloader::SyncTarget;
|
||||||
use reth_interfaces::p2p::headers::downloader::SyncTarget;
|
|
||||||
use reth_primitives::{BlockHashOrNumber, BlockNumber, SealedHeader, B256};
|
use reth_primitives::{BlockHashOrNumber, BlockNumber, SealedHeader, B256};
|
||||||
use reth_storage_errors::provider::ProviderResult;
|
use reth_storage_errors::provider::ProviderResult;
|
||||||
use tokio::sync::watch;
|
use tokio::sync::watch;
|
||||||
@ -37,7 +36,7 @@ impl HeaderSyncGap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Client trait for determining the current headers sync gap.
|
/// Client trait for determining the current headers sync gap.
|
||||||
#[auto_impl(&, Arc)]
|
#[auto_impl::auto_impl(&, Arc)]
|
||||||
pub trait HeaderSyncGapProvider: Send + Sync {
|
pub trait HeaderSyncGapProvider: Send + Sync {
|
||||||
/// Find a current sync gap for the headers depending on the [HeaderSyncMode] and the last
|
/// Find a current sync gap for the headers depending on the [HeaderSyncMode] and the last
|
||||||
/// uninterrupted block number. Last uninterrupted block represents the block number before
|
/// uninterrupted block number. Last uninterrupted block represents the block number before
|
||||||
|
|||||||
Reference in New Issue
Block a user