mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
refactor(provider): random_block and random_block_range functions (#10563)
This commit is contained in:
@@ -183,15 +183,13 @@ impl BlockBuffer {
|
||||
mod tests {
|
||||
use crate::BlockBuffer;
|
||||
use reth_primitives::{BlockHash, BlockNumHash, SealedBlockWithSenders};
|
||||
use reth_testing_utils::{
|
||||
generators,
|
||||
generators::{random_block, Rng},
|
||||
};
|
||||
use reth_testing_utils::generators::{self, random_block, BlockParams, Rng};
|
||||
use std::collections::HashMap;
|
||||
|
||||
/// Create random block with specified number and parent hash.
|
||||
fn create_block<R: Rng>(rng: &mut R, number: u64, parent: BlockHash) -> SealedBlockWithSenders {
|
||||
let block = random_block(rng, number, Some(parent), None, None, None, None);
|
||||
let block =
|
||||
random_block(rng, number, BlockParams { parent: Some(parent), ..Default::default() });
|
||||
block.seal_with_senders().unwrap()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user