mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor: rm CallRequest (#6364)
This commit is contained in:
@ -100,7 +100,7 @@ pub fn calculate_receipt_root(
|
||||
|
||||
return ordered_trie_root_with_encoder(receipts.as_slice(), |r, buf| {
|
||||
r.encode_inner(buf, false)
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
ordered_trie_root_with_encoder(receipts, |r, buf| r.encode_inner(buf, false))
|
||||
@ -144,7 +144,7 @@ pub fn calculate_receipt_root_ref(
|
||||
|
||||
return ordered_trie_root_with_encoder(&receipts, |r, buf| {
|
||||
ReceiptWithBloomRef::from(r).encode_inner(buf, false)
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
ordered_trie_root_with_encoder(receipts, |r, buf| {
|
||||
@ -156,7 +156,7 @@ pub fn calculate_receipt_root_ref(
|
||||
pub fn calculate_ommers_root(ommers: &[Header]) -> B256 {
|
||||
// Check if `ommers` list is empty
|
||||
if ommers.is_empty() {
|
||||
return EMPTY_OMMER_ROOT_HASH
|
||||
return EMPTY_OMMER_ROOT_HASH;
|
||||
}
|
||||
// RLP Encode
|
||||
let mut ommers_rlp = Vec::new();
|
||||
@ -627,6 +627,7 @@ mod tests {
|
||||
let mut genesis_alloc = HashMap::new();
|
||||
genesis_alloc
|
||||
.insert(test_addr, GenesisAccount { balance: U256::MAX, ..Default::default() });
|
||||
|
||||
let root = state_root_unhashed(genesis_alloc);
|
||||
|
||||
assert_eq!(root, expected_root);
|
||||
|
||||
Reference in New Issue
Block a user