mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: Alloy migration (#4737)
Co-authored-by: Alessandro Mazza <121622391+alessandromazza98@users.noreply.github.com> Co-authored-by: Supernovahs.eth <91280922+supernovahs@users.noreply.github.com> Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
This commit is contained in:
@ -9,7 +9,7 @@ use reth_network::test_utils::{NetworkEventStream, Testnet};
|
||||
use reth_network_api::{NetworkInfo, Peers};
|
||||
use reth_primitives::{
|
||||
Block, BlockBody, Bytes, Header, HeadersDirection, Signature, Transaction, TransactionKind,
|
||||
TransactionSigned, TxEip2930, H256, U256,
|
||||
TransactionSigned, TxEip2930, U256,
|
||||
};
|
||||
use reth_provider::test_utils::MockEthProvider;
|
||||
use std::sync::Arc;
|
||||
@ -58,7 +58,7 @@ async fn test_get_body() {
|
||||
// request some blocks
|
||||
for _ in 0..100 {
|
||||
// Set a new random block to the mock storage and request it via the network
|
||||
let block_hash = H256::random();
|
||||
let block_hash = rng.gen();
|
||||
let mut block = Block::default();
|
||||
block.body.push(rng_transaction(&mut rng));
|
||||
|
||||
@ -100,12 +100,12 @@ async fn test_get_header() {
|
||||
assert_eq!(connected, *handle1.peer_id());
|
||||
|
||||
let start: u64 = rng.gen();
|
||||
let mut hash = H256::random();
|
||||
let mut hash = rng.gen();
|
||||
// request some headers
|
||||
for idx in 0..100 {
|
||||
// Set a new random header to the mock storage and request it via the network
|
||||
let header = Header { number: start + idx, parent_hash: hash, ..Default::default() };
|
||||
hash = H256::random();
|
||||
hash = rng.gen();
|
||||
|
||||
mock_provider.add_header(hash, header.clone());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user