fix(op): set optimism flag correctly (#6593)

This commit is contained in:
rakita
2024-02-14 00:43:22 +01:00
committed by GitHub
parent cfc914669b
commit 4b21cf610c
12 changed files with 55 additions and 45 deletions

View File

@ -99,7 +99,7 @@ pub fn calculate_receipt_root_optimism(
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))
@ -142,7 +142,7 @@ pub fn calculate_receipt_root_ref_optimism(
return ordered_trie_root_with_encoder(&receipts, |r, buf| {
ReceiptWithBloomRef::from(r).encode_inner(buf, false)
});
})
}
ordered_trie_root_with_encoder(receipts, |r, buf| {
@ -154,7 +154,7 @@ pub fn calculate_receipt_root_ref_optimism(
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();