Skip to content

Commit b57a560

Browse files
authored
test: make provider compile with cargo t (paradigmxyz#11817)
1 parent 1b97b1d commit b57a560

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

crates/storage/provider/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@ rayon.workspace = true
7373
[dev-dependencies]
7474
reth-db = { workspace = true, features = ["test-utils"] }
7575
reth-primitives = { workspace = true, features = ["arbitrary", "test-utils"] }
76+
reth-chain-state = { workspace = true, features = ["test-utils"] }
7677
reth-trie = { workspace = true, features = ["test-utils"] }
7778
reth-testing-utils.workspace = true
79+
reth-ethereum-engine-primitives.workspace = true
7880

7981
parking_lot.workspace = true
8082
tempfile.workspace = true

crates/storage/provider/src/providers/blockchain_provider.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,7 +1933,7 @@ mod tests {
19331933
/// This simulates a RPC method having a different view than when its database transaction was
19341934
/// created.
19351935
fn persist_block_after_db_tx_creation(
1936-
provider: Arc<BlockchainProvider2<MockNodeTypesWithDB>>,
1936+
provider: BlockchainProvider2<MockNodeTypesWithDB>,
19371937
block_number: BlockNumber,
19381938
) {
19391939
let hook_provider = provider.clone();
@@ -3142,7 +3142,6 @@ mod tests {
31423142
..Default::default()
31433143
},
31443144
)?;
3145-
let provider = Arc::new(provider);
31463145

31473146
$(
31483147
// Since data moves for each tried method, need to recalculate everything
@@ -3257,7 +3256,6 @@ mod tests {
32573256
..Default::default()
32583257
},
32593258
)?;
3260-
let provider = Arc::new(provider);
32613259

32623260
$(
32633261
// Since data moves for each tried method, need to recalculate everything
@@ -3383,7 +3381,6 @@ mod tests {
33833381
..Default::default()
33843382
},
33853383
)?;
3386-
let provider = Arc::new(provider);
33873384

33883385
let mut in_memory_blocks: std::collections::VecDeque<_> = in_memory_blocks.into();
33893386

@@ -3685,8 +3682,6 @@ mod tests {
36853682
},
36863683
)?;
36873684

3688-
let provider = Arc::new(provider);
3689-
36903685
// Old implementation was querying the database first. This is problematic, if there are
36913686
// changes AFTER the database transaction is created.
36923687
let old_transaction_hash_fn =
@@ -3739,7 +3734,7 @@ mod tests {
37393734
correct_transaction_hash_fn(
37403735
to_be_persisted_tx.hash(),
37413736
provider.canonical_in_memory_state(),
3742-
provider.database.clone()
3737+
provider.database
37433738
),
37443739
Ok(Some(to_be_persisted_tx))
37453740
);

0 commit comments

Comments
 (0)