warn on tx failure

This commit is contained in:
Sina Mahmoodi 2025-08-27 15:49:24 +02:00
parent 3958c0ee2e
commit d883217beb

View file

@ -109,6 +109,9 @@ func testPrestateTracer(tracerName string, dirPath string, t *testing.T) {
if err != nil { if err != nil {
t.Fatalf("failed to execute transaction: %v", err) t.Fatalf("failed to execute transaction: %v", err)
} }
if vmRet.Failed() {
t.Logf("(warn) transaction failed: %v", vmRet.Err)
}
tracer.OnTxEnd(&types.Receipt{GasUsed: vmRet.UsedGas}, nil) tracer.OnTxEnd(&types.Receipt{GasUsed: vmRet.UsedGas}, nil)
// Retrieve the trace result and compare against the expected // Retrieve the trace result and compare against the expected
res, err := tracer.GetResult() res, err := tracer.GetResult()