mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-30 01:28:21 -05:00
fix(rlp): receipts from non legacy transactions returning wrong length (#847)
This commit is contained in:
@@ -48,6 +48,25 @@ mod test {
|
||||
use reth_primitives::{Log, Receipt, TxType};
|
||||
use reth_rlp::{Decodable, Encodable};
|
||||
|
||||
#[test]
|
||||
fn roundtrip_eip1559() {
|
||||
let receipts = Receipts(vec![vec![Receipt {
|
||||
tx_type: TxType::EIP1559,
|
||||
success: false,
|
||||
cumulative_gas_used: 0,
|
||||
bloom: Default::default(),
|
||||
logs: vec![],
|
||||
}]]);
|
||||
|
||||
let mut out = vec![];
|
||||
receipts.encode(&mut out);
|
||||
|
||||
let mut out = out.as_slice();
|
||||
let decoded = Receipts::decode(&mut out).unwrap();
|
||||
|
||||
assert!(receipts == decoded);
|
||||
}
|
||||
|
||||
#[test]
|
||||
// Test vector from: https://eips.ethereum.org/EIPS/eip-2481
|
||||
fn encode_get_receipts() {
|
||||
|
||||
Reference in New Issue
Block a user