Skip to content

Commit

Permalink
Added more testing hook
Browse files Browse the repository at this point in the history
  • Loading branch information
maoueh committed Dec 10, 2024
1 parent 9f05ba8 commit 9b203e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions x/evm/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/ethereum/go-ethereum/common"
cmath "github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/tracing"
ethtypes "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/crypto"
Expand Down Expand Up @@ -294,15 +293,7 @@ func (k *Keeper) applyEVMMessageWithTracing(
txCtx := core.NewEVMTxContext(msg)
evmHooks := evmtracers.GetCtxEthTracingHooks(ctx)
evmInstance := vm.NewEVM(*blockCtx, txCtx, stateDB, cfg, vm.Config{
Tracer: &tracing.Hooks{
OnTxStart: func(vm *tracing.VMContext, tx *ethtypes.Transaction, from common.Address) {
evmHooks.OnTxStart(vm, tx, from)

evmHooks.OnEnter(0, 0xf1, msg.From, msg.From, msg.Data, msg.GasLimit, msg.Value)
evmHooks.OnExit(0, nil, 0, nil, false)
},
OnTxEnd: evmHooks.OnTxEnd,
},
Tracer: evmHooks,
})
stateDB.SetEVM(evmInstance)
// stateDB.SetLogger(evmHooks)
Expand Down
2 changes: 1 addition & 1 deletion x/evm/tracers/firehose.go
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ func (f *Firehose) completeTransaction(receipt *types.Receipt) *pbeth.Transactio
// Order is important, we must populate the state reverted before we remove the log block index and re-assign ordinals
f.populateStateReverted()
f.removeLogBlockIndexOnStateRevertedCalls()
f.assignOrdinalAndIndexToReceiptLogs()
// f.assignOrdinalAndIndexToReceiptLogs()

if *f.applyBackwardCompatibility {
// Known Firehose issue: This field has never been populated in the old Firehose instrumentation
Expand Down

0 comments on commit 9b203e4

Please sign in to comment.