fix(poststate): duplicate receipts (#2632)

This commit is contained in:
Roman Krasiuk
2023-05-12 20:31:01 +03:00
committed by GitHub
parent 047f1e513c
commit 8c1a1e0e06
8 changed files with 107 additions and 72 deletions

View File

@ -178,11 +178,11 @@ where
// clear all transactions from pool
pool.remove_transactions(body.iter().map(|tx| tx.hash()));
header.receipts_root = if post_state.receipts().is_empty() {
let receipts = post_state.receipts(header.number);
header.receipts_root = if receipts.is_empty() {
EMPTY_RECEIPTS
} else {
let receipts_with_bloom = post_state
.receipts()
let receipts_with_bloom = receipts
.iter()
.map(|r| r.clone().into())
.collect::<Vec<ReceiptWithBloom>>();