test: make provider compile with cargo t (#11817)

This commit is contained in:
Matthias Seitz
2024-10-17 05:05:26 +02:00
committed by GitHub
parent 1b97b1d942
commit b57a5607cb
2 changed files with 4 additions and 7 deletions

View File

@ -73,8 +73,10 @@ rayon.workspace = true
[dev-dependencies]
reth-db = { workspace = true, features = ["test-utils"] }
reth-primitives = { workspace = true, features = ["arbitrary", "test-utils"] }
reth-chain-state = { workspace = true, features = ["test-utils"] }
reth-trie = { workspace = true, features = ["test-utils"] }
reth-testing-utils.workspace = true
reth-ethereum-engine-primitives.workspace = true
parking_lot.workspace = true
tempfile.workspace = true

View File

@ -1933,7 +1933,7 @@ mod tests {
/// This simulates a RPC method having a different view than when its database transaction was
/// created.
fn persist_block_after_db_tx_creation(
provider: Arc<BlockchainProvider2<MockNodeTypesWithDB>>,
provider: BlockchainProvider2<MockNodeTypesWithDB>,
block_number: BlockNumber,
) {
let hook_provider = provider.clone();
@ -3142,7 +3142,6 @@ mod tests {
..Default::default()
},
)?;
let provider = Arc::new(provider);
$(
// Since data moves for each tried method, need to recalculate everything
@ -3257,7 +3256,6 @@ mod tests {
..Default::default()
},
)?;
let provider = Arc::new(provider);
$(
// Since data moves for each tried method, need to recalculate everything
@ -3383,7 +3381,6 @@ mod tests {
..Default::default()
},
)?;
let provider = Arc::new(provider);
let mut in_memory_blocks: std::collections::VecDeque<_> = in_memory_blocks.into();
@ -3685,8 +3682,6 @@ mod tests {
},
)?;
let provider = Arc::new(provider);
// Old implementation was querying the database first. This is problematic, if there are
// changes AFTER the database transaction is created.
let old_transaction_hash_fn =
@ -3739,7 +3734,7 @@ mod tests {
correct_transaction_hash_fn(
to_be_persisted_tx.hash(),
provider.canonical_in_memory_state(),
provider.database.clone()
provider.database
),
Ok(Some(to_be_persisted_tx))
);