mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: use alloy block types (#13518)
This commit is contained in:
@ -146,7 +146,6 @@ impl PruneInput {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use alloy_primitives::B256;
|
||||
use reth_primitives_traits::BlockBody;
|
||||
use reth_provider::{
|
||||
providers::BlockchainProvider2,
|
||||
test_utils::{create_test_provider_factory, MockEthProvider},
|
||||
@ -243,8 +242,7 @@ mod tests {
|
||||
let range = input.get_next_tx_num_range(&provider).expect("Expected range").unwrap();
|
||||
|
||||
// Calculate the total number of transactions
|
||||
let num_txs =
|
||||
blocks.iter().map(|block| block.body.transactions().len() as u64).sum::<u64>();
|
||||
let num_txs = blocks.iter().map(|block| block.body.transactions.len() as u64).sum::<u64>();
|
||||
|
||||
assert_eq!(range, 0..=num_txs - 1);
|
||||
}
|
||||
@ -290,8 +288,7 @@ mod tests {
|
||||
let range = input.get_next_tx_num_range(&provider).expect("Expected range").unwrap();
|
||||
|
||||
// Calculate the total number of transactions
|
||||
let num_txs =
|
||||
blocks.iter().map(|block| block.body.transactions().len() as u64).sum::<u64>();
|
||||
let num_txs = blocks.iter().map(|block| block.body.transactions.len() as u64).sum::<u64>();
|
||||
|
||||
assert_eq!(range, 0..=num_txs - 1,);
|
||||
}
|
||||
@ -325,8 +322,7 @@ mod tests {
|
||||
|
||||
// Get the last tx number
|
||||
// Calculate the total number of transactions
|
||||
let num_txs =
|
||||
blocks.iter().map(|block| block.body.transactions().len() as u64).sum::<u64>();
|
||||
let num_txs = blocks.iter().map(|block| block.body.transactions.len() as u64).sum::<u64>();
|
||||
let max_range = num_txs - 1;
|
||||
|
||||
// Create a prune input with a previous checkpoint that is the last tx number
|
||||
|
||||
Reference in New Issue
Block a user