Files
nanoreth/crates/net/eth-wire/tests/new_pooled_transactions.rs
Kim, JinSan c9075920c1 feat(net): support eth/68 (#1361)
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2023-02-20 19:37:03 -08:00

15 lines
595 B
Rust

//! Decoding tests for [`NewPooledTransactions`]
use reth_eth_wire::NewPooledTransactionHashes66;
use reth_primitives::hex;
use reth_rlp::Decodable;
use std::{fs, path::PathBuf};
#[test]
fn decode_new_pooled_transaction_hashes_network() {
let network_data_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("testdata/new_pooled_transactions_network_rlp");
let data = fs::read_to_string(network_data_path).expect("Unable to read file");
let hex_data = hex::decode(data.trim()).unwrap();
let _txs = NewPooledTransactionHashes66::decode(&mut &hex_data[..]).unwrap();
}