fix makeHeaders using unpopulated parent

This commit is contained in:
Sina Mahmoodi 2024-03-05 16:41:23 +01:00
parent 49bf257ce5
commit 9fa1556dff

View file

@ -393,7 +393,7 @@ func makeHeaders(config *params.ChainConfig, blocks []simBlock, base *types.Head
if config.IsLondon(overrides.Number.ToInt()) {
baseFee = eip1559.CalcBaseFee(config, header)
}
header = &types.Header{
header = overrides.MakeHeader(&types.Header{
UncleHash: types.EmptyUncleHash,
ReceiptHash: types.EmptyReceiptsHash,
TxHash: types.EmptyTxsHash,
@ -402,8 +402,8 @@ func makeHeaders(config *params.ChainConfig, blocks []simBlock, base *types.Head
GasLimit: base.GasLimit,
//MixDigest: header.MixDigest,
BaseFee: baseFee,
}
res[bi] = overrides.MakeHeader(header)
})
res[bi] = header
}
return res, nil
}