diff --git a/core/state/statedb.go b/core/state/statedb.go index b030e7f2db..d4048cb985 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -21,7 +21,6 @@ import ( "errors" "fmt" "maps" - "os" "slices" "sync" "sync/atomic" @@ -896,15 +895,10 @@ func (s *StateDB) SelfDestruct(addr common.Address) uint256.Int { prevBalance = *(stateObject.Balance()) - fmt.Fprintf(os.Stderr, "[Firehose] SelfDestruct (statedb): Firehose 2.3 would have called RecordSuicide here (addr=%s, prevBalance=%s, sign=%d)\n", addr, &prevBalance, prevBalance.ToBig().Sign()) - // Regardless of whether it is already destructed or not, we do have to // journal the balance-change, if we set it to zero here. if !stateObject.Balance().IsZero() { - fmt.Fprintf(os.Stderr, "[Firehose] SelfDestruct (statedb): previous balance is non-zero (addr=%s)\n", addr) stateObject.SetBalance(new(uint256.Int)) - } else { - fmt.Fprintf(os.Stderr, "[Firehose] SelfDestruct (statedb): previous balance is zero! (addr=%s)\n", addr) } // If it is already marked as self-destructed, we do not need to add it // for journalling a second time. @@ -920,13 +914,10 @@ func (s *StateDB) SelfDestruct(addr common.Address) uint256.Int { func (s *StateDB) SelfDestruct6780(addr common.Address) (uint256.Int, bool) { stateObject := s.getStateObject(addr) if stateObject == nil { - fmt.Fprintf(os.Stderr, "[Firehose] SelfDestruct6780: stateObject is nil (addr=%s)\n", addr) return uint256.Int{}, false } if stateObject.newContract { return s.SelfDestruct(addr), true - } else { - fmt.Fprintf(os.Stderr, "[Firehose] SelfDestruct6780: stateObject is not a new contract (addr=%s)\n", addr) } return *(stateObject.Balance()), false } diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 8ea7a698c1..bbb5cedc34 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -17,9 +17,7 @@ package vm import ( - "fmt" "math" - "os" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/tracing" @@ -1011,9 +1009,7 @@ func opSelfdestruct6780(pc *uint64, interpreter *EVMInterpreter, scope *ScopeCon } beneficiary := scope.Stack.pop() balance := interpreter.evm.StateDB.GetBalance(scope.Contract.Address()) - fmt.Fprintf(os.Stderr, "[Firehose] SelfDestruct6780 (instructions): previous balance withdraw (addr=%s, prev_balance=%s)\n", scope.Contract.Address(), balance) interpreter.evm.StateDB.SubBalance(scope.Contract.Address(), balance, tracing.BalanceDecreaseSelfdestruct) - fmt.Fprintf(os.Stderr, "[Firehose] SelfDestruct6780 (instructions): previous balance refund (addr=%s, refund=%s)\n", common.Address(beneficiary.Bytes20()), balance) interpreter.evm.StateDB.AddBalance(beneficiary.Bytes20(), balance, tracing.BalanceIncreaseSelfdestruct) interpreter.evm.StateDB.SelfDestruct6780(scope.Contract.Address()) if tracer := interpreter.evm.Config.Tracer; tracer != nil {