chore: remove reth-primitives dependency from reth-prune (#8897)

This commit is contained in:
joshieDo
2024-06-17 19:28:12 +02:00
committed by GitHub
parent 2219d7d23e
commit 8182d2e632
12 changed files with 13 additions and 12 deletions

View File

@ -15,7 +15,6 @@ workspace = true
# reth
reth-chainspec.workspace = true
reth-exex-types.workspace = true
reth-primitives.workspace = true
reth-db.workspace = true
reth-db-api.workspace = true
reth-errors.workspace = true
@ -23,6 +22,7 @@ reth-provider.workspace = true
reth-tokio-util.workspace = true
reth-config.workspace = true
reth-prune-types.workspace = true
reth-static-file-types.workspace = true
# metrics
reth-metrics.workspace = true

View File

@ -5,13 +5,14 @@ use crate::{
segments::{PruneInput, Segment},
Metrics, PrunerError, PrunerEvent,
};
use alloy_primitives::BlockNumber;
use reth_db_api::database::Database;
use reth_exex_types::FinishedExExHeight;
use reth_primitives::{BlockNumber, StaticFileSegment};
use reth_provider::{
DatabaseProviderRW, ProviderFactory, PruneCheckpointReader, StaticFileProviderFactory,
};
use reth_prune_types::{PruneLimiter, PruneMode, PruneProgress, PrunePurpose, PruneSegment};
use reth_static_file_types::StaticFileSegment;
use reth_tokio_util::{EventSender, EventStream};
use std::{
collections::BTreeMap,

View File

@ -106,9 +106,9 @@ mod tests {
account_history::ACCOUNT_HISTORY_TABLES_TO_PRUNE, AccountHistory, PruneInput, PruneOutput,
Segment,
};
use alloy_primitives::{BlockNumber, B256};
use assert_matches::assert_matches;
use reth_db::{tables, BlockNumberList};
use reth_primitives::{BlockNumber, B256};
use reth_provider::PruneCheckpointReader;
use reth_prune_types::{
PruneCheckpoint, PruneInterruptReason, PruneLimiter, PruneMode, PruneProgress, PruneSegment,

View File

@ -188,10 +188,10 @@ where
#[cfg(test)]
mod tests {
use alloy_primitives::{BlockNumber, B256, U256};
use assert_matches::assert_matches;
use reth_db::tables;
use reth_db_api::transaction::DbTx;
use reth_primitives::{BlockNumber, B256, U256};
use reth_provider::PruneCheckpointReader;
use reth_prune_types::{
PruneCheckpoint, PruneInterruptReason, PruneLimiter, PruneMode, PruneProgress, PruneSegment,

View File

@ -1,3 +1,4 @@
use alloy_primitives::BlockNumber;
use reth_db::BlockNumberList;
use reth_db_api::{
cursor::{DbCursorRO, DbCursorRW},
@ -7,7 +8,6 @@ use reth_db_api::{
transaction::DbTxMut,
DatabaseError,
};
use reth_primitives::BlockNumber;
use reth_provider::DatabaseProviderRW;
/// Prune history indices up to the provided block, inclusive.

View File

@ -94,13 +94,13 @@ impl<DB: Database> Segment<DB> for Receipts {
#[cfg(test)]
mod tests {
use crate::segments::{PruneInput, PruneOutput, Receipts, Segment};
use alloy_primitives::{BlockNumber, TxNumber, B256};
use assert_matches::assert_matches;
use itertools::{
FoldWhile::{Continue, Done},
Itertools,
};
use reth_db::tables;
use reth_primitives::{BlockNumber, TxNumber, B256};
use reth_provider::PruneCheckpointReader;
use reth_prune_types::{
PruneCheckpoint, PruneInterruptReason, PruneLimiter, PruneMode, PruneProgress, PruneSegment,

View File

@ -216,10 +216,10 @@ impl<DB: Database> Segment<DB> for ReceiptsByLogs {
#[cfg(test)]
mod tests {
use crate::segments::{receipts_by_logs::ReceiptsByLogs, PruneInput, Segment};
use alloy_primitives::B256;
use assert_matches::assert_matches;
use reth_db::tables;
use reth_db_api::{cursor::DbCursorRO, transaction::DbTx};
use reth_primitives::B256;
use reth_provider::{PruneCheckpointReader, TransactionsProvider};
use reth_prune_types::{PruneLimiter, PruneMode, PruneSegment, ReceiptsLogPruneConfig};
use reth_stages::test_utils::{StorageKind, TestStageDB};

View File

@ -77,13 +77,13 @@ impl<DB: Database> Segment<DB> for SenderRecovery {
#[cfg(test)]
mod tests {
use crate::segments::{PruneInput, PruneOutput, Segment, SenderRecovery};
use alloy_primitives::{BlockNumber, TxNumber, B256};
use assert_matches::assert_matches;
use itertools::{
FoldWhile::{Continue, Done},
Itertools,
};
use reth_db::tables;
use reth_primitives::{BlockNumber, TxNumber, B256};
use reth_provider::PruneCheckpointReader;
use reth_prune_types::{PruneCheckpoint, PruneLimiter, PruneMode, PruneProgress, PruneSegment};
use reth_stages::test_utils::{StorageKind, TestStageDB};

View File

@ -109,9 +109,9 @@ mod tests {
storage_history::STORAGE_HISTORY_TABLES_TO_PRUNE, PruneInput, PruneOutput, Segment,
StorageHistory,
};
use alloy_primitives::{BlockNumber, B256};
use assert_matches::assert_matches;
use reth_db::{tables, BlockNumberList};
use reth_primitives::{BlockNumber, B256};
use reth_provider::PruneCheckpointReader;
use reth_prune_types::{PruneCheckpoint, PruneLimiter, PruneMode, PruneProgress, PruneSegment};
use reth_stages::test_utils::{StorageKind, TestStageDB};

View File

@ -104,13 +104,13 @@ impl<DB: Database> Segment<DB> for TransactionLookup {
#[cfg(test)]
mod tests {
use crate::segments::{PruneInput, PruneOutput, Segment, TransactionLookup};
use alloy_primitives::{BlockNumber, TxNumber, B256};
use assert_matches::assert_matches;
use itertools::{
FoldWhile::{Continue, Done},
Itertools,
};
use reth_db::tables;
use reth_primitives::{BlockNumber, TxNumber, B256};
use reth_provider::PruneCheckpointReader;
use reth_prune_types::{
PruneCheckpoint, PruneInterruptReason, PruneLimiter, PruneMode, PruneProgress, PruneSegment,

View File

@ -76,13 +76,13 @@ impl<DB: Database> Segment<DB> for Transactions {
#[cfg(test)]
mod tests {
use crate::segments::{PruneInput, PruneOutput, Segment, Transactions};
use alloy_primitives::{BlockNumber, TxNumber, B256};
use assert_matches::assert_matches;
use itertools::{
FoldWhile::{Continue, Done},
Itertools,
};
use reth_db::tables;
use reth_primitives::{BlockNumber, TxNumber, B256};
use reth_provider::PruneCheckpointReader;
use reth_prune_types::{
PruneCheckpoint, PruneInterruptReason, PruneLimiter, PruneMode, PruneProgress, PruneSegment,