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": [