fix(callflat): set ctx in live mode

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
jsvisa 2024-08-19 15:18:47 +00:00
parent cbd1e10e9e
commit 1aac054d9a

View file

@ -214,6 +214,14 @@ 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),
}
}
t.tracer.OnTxEnd(receipt, err)
}