From a92c9f60bffea2117878661a0835f4c3e79d6945 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 15 Sep 2025 20:12:07 +0200 Subject: [PATCH] cmd/evm/internal/t8ntool: fix transactionIndex --- cmd/evm/internal/t8ntool/execution.go | 2 +- cmd/evm/testdata/30/exp.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/evm/internal/t8ntool/execution.go b/cmd/evm/internal/t8ntool/execution.go index 487e53023d..f98697c174 100644 --- a/cmd/evm/internal/t8ntool/execution.go +++ b/cmd/evm/internal/t8ntool/execution.go @@ -248,7 +248,7 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig, continue } } - statedb.SetTxContext(tx.Hash(), i) + statedb.SetTxContext(tx.Hash(), len(receipts)) var ( snapshot = statedb.Snapshot() prevGas = gaspool.Gas() diff --git a/cmd/evm/testdata/30/exp.json b/cmd/evm/testdata/30/exp.json index 0af6d73f7a..9861f5a071 100644 --- a/cmd/evm/testdata/30/exp.json +++ b/cmd/evm/testdata/30/exp.json @@ -47,7 +47,7 @@ "effectiveGasPrice": null, "blockHash": "0x1337000000000000000000000000000000000000000000000000000000000000", "blockNumber": "0x1", - "transactionIndex": "0x2" + "transactionIndex": "0x1" } ], "rejected": [