internal/ethapi: fix logs bloom in eth_simulateV1 (#31411)

Geth was returning empty logsBloom for the simulated block.
This commit is contained in:
Sina M 2025-03-18 12:40:38 +01:00 committed by GitHub
parent 668118bfe1
commit e5f4b274b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -217,9 +217,13 @@ func (sim *simulator) processBlock(ctx context.Context, block *simBlock, header,
if err := sim.sanitizeCall(&call, sim.state, header, blockContext, &gasUsed); err != nil {
return nil, nil, err
}
tx := call.ToTransaction(types.DynamicFeeTxType)
var (
tx = call.ToTransaction(types.DynamicFeeTxType)
txHash = tx.Hash()
)
txes[i] = tx
tracer.reset(tx.Hash(), uint(i))
tracer.reset(txHash, uint(i))
sim.state.SetTxContext(txHash, i)
// EoA check is always skipped, even in validation mode.
msg := call.ToMessage(header.BaseFee, !sim.validate, true)
result, err := applyMessageWithEVM(ctx, evm, msg, timeout, sim.gp)