native/flat: always set context from receipt

Signed-off-by: jsvisa <delweng@gmail.com>
pull/30255/head
jsvisa 1 month ago
parent 60b25f69db
commit 5f6cb53130
  1. 13
      eth/tracers/native/call_flat.go

@ -220,13 +220,12 @@ func (t *flatCallTracer) OnTxEnd(receipt *types.Receipt, err error) {
if t.interrupt.Load() {
return
}
if t.ctx == nil {
t.ctx = &tracers.Context{
BlockHash: receipt.BlockHash,
BlockNumber: receipt.BlockNumber,
TxHash: receipt.TxHash,
TxIndex: int(receipt.TransactionIndex),
}
// Always set context with receipt data.
t.ctx = &tracers.Context{
BlockHash: receipt.BlockHash,
BlockNumber: receipt.BlockNumber,
TxHash: receipt.TxHash,
TxIndex: int(receipt.TransactionIndex),
}
t.tracer.OnTxEnd(receipt, err)
}

Loading…
Cancel
Save