mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
Removed a bunch of debug logs to we can make a release
This commit is contained in:
parent
32f4d962ee
commit
e4757ff338
2 changed files with 0 additions and 13 deletions
|
|
@ -21,7 +21,6 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"maps"
|
"maps"
|
||||||
"os"
|
|
||||||
"slices"
|
"slices"
|
||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
@ -896,15 +895,10 @@ func (s *StateDB) SelfDestruct(addr common.Address) uint256.Int {
|
||||||
|
|
||||||
prevBalance = *(stateObject.Balance())
|
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
|
// Regardless of whether it is already destructed or not, we do have to
|
||||||
// journal the balance-change, if we set it to zero here.
|
// journal the balance-change, if we set it to zero here.
|
||||||
if !stateObject.Balance().IsZero() {
|
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))
|
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
|
// If it is already marked as self-destructed, we do not need to add it
|
||||||
// for journalling a second time.
|
// 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) {
|
func (s *StateDB) SelfDestruct6780(addr common.Address) (uint256.Int, bool) {
|
||||||
stateObject := s.getStateObject(addr)
|
stateObject := s.getStateObject(addr)
|
||||||
if stateObject == nil {
|
if stateObject == nil {
|
||||||
fmt.Fprintf(os.Stderr, "[Firehose] SelfDestruct6780: stateObject is nil (addr=%s)\n", addr)
|
|
||||||
return uint256.Int{}, false
|
return uint256.Int{}, false
|
||||||
}
|
}
|
||||||
if stateObject.newContract {
|
if stateObject.newContract {
|
||||||
return s.SelfDestruct(addr), true
|
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
|
return *(stateObject.Balance()), false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,7 @@
|
||||||
package vm
|
package vm
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"math"
|
"math"
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/core/tracing"
|
"github.com/ethereum/go-ethereum/core/tracing"
|
||||||
|
|
@ -1011,9 +1009,7 @@ func opSelfdestruct6780(pc *uint64, interpreter *EVMInterpreter, scope *ScopeCon
|
||||||
}
|
}
|
||||||
beneficiary := scope.Stack.pop()
|
beneficiary := scope.Stack.pop()
|
||||||
balance := interpreter.evm.StateDB.GetBalance(scope.Contract.Address())
|
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)
|
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.AddBalance(beneficiary.Bytes20(), balance, tracing.BalanceIncreaseSelfdestruct)
|
||||||
interpreter.evm.StateDB.SelfDestruct6780(scope.Contract.Address())
|
interpreter.evm.StateDB.SelfDestruct6780(scope.Contract.Address())
|
||||||
if tracer := interpreter.evm.Config.Tracer; tracer != nil {
|
if tracer := interpreter.evm.Config.Tracer; tracer != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue