Skip to content

Commit

Permalink
rm OnNewAccount
Browse files Browse the repository at this point in the history
  • Loading branch information
dhyaniarun1993 committed Feb 13, 2024
1 parent 79bf2dc commit 93b61c7
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 38 deletions.
2 changes: 0 additions & 2 deletions cmd/state/commands/opcode_tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,6 @@ func (ot *opcodeTracer) OnStorageChange(a libcommon.Address, k *libcommon.Hash,

func (ot *opcodeTracer) OnLog(log *types.Log) {}

func (ot *opcodeTracer) OnNewAccount(a libcommon.Address, reset bool) {}

// GetResult returns an empty json object.
func (ot *opcodeTracer) GetResult() (json.RawMessage, error) {
return json.RawMessage(`{}`), nil
Expand Down
2 changes: 0 additions & 2 deletions cmd/state/exec3/calltracer_v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ func (ct *CallTracer) OnStorageChange(a libcommon.Address, k *libcommon.Hash, pr

func (ct *CallTracer) OnLog(log *types.Log) {}

func (ct *CallTracer) OnNewAccount(a libcommon.Address, reset bool) {}

// GetResult returns an empty json object.
func (ct *CallTracer) GetResult() (json.RawMessage, error) {
return json.RawMessage(`{}`), nil
Expand Down
6 changes: 0 additions & 6 deletions core/state/intra_block_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ type StateLogger interface {
OnCodeChange(addr libcommon.Address, prevCodeHash libcommon.Hash, prevCode []byte, codeHash libcommon.Hash, code []byte)
OnStorageChange(addr libcommon.Address, slot *libcommon.Hash, prev, new uint256.Int)
OnLog(log *types.Log)
OnNewAccount(addr libcommon.Address, reset bool)
}

// SystemAddress - sender address for internal state updates.
Expand Down Expand Up @@ -551,11 +550,6 @@ func (sdb *IntraBlockState) GetOrNewStateObject(addr libcommon.Address) *stateOb
func (sdb *IntraBlockState) createObject(addr libcommon.Address, previous *stateObject) (newobj *stateObject) {
account := new(accounts.Account)
var original *accounts.Account

if sdb.logger != nil {
sdb.logger.OnNewAccount(addr, previous != nil)
}

if previous == nil {
original = &accounts.Account{}
} else {
Expand Down
2 changes: 0 additions & 2 deletions eth/calltracer/calltracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ func (ct *CallTracer) OnStorageChange(addr libcommon.Address, k *libcommon.Hash,

func (ct *CallTracer) OnLog(log *types.Log) {}

func (ct *CallTracer) OnNewAccount(addr libcommon.Address, reset bool) {}

func (ct *CallTracer) CaptureExit(output []byte, usedGas uint64, err error, reverted bool) {
}

Expand Down
4 changes: 0 additions & 4 deletions eth/tracers/live/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ func (p *Printer) OnLog(l *types.Log) {
fmt.Printf("OnLog: l=%s\n", buf)
}

func (p *Printer) OnNewAccount(a libcommon.Address, reset bool) {
fmt.Printf("OnNewAccount: a=%v\n", a)
}

func (p *Printer) OnGasChange(old, new uint64, reason vm.GasChangeReason) {
fmt.Printf("OnGasChange: old=%v, new=%v, diff=%v\n", old, new, new-old)
}
Expand Down
2 changes: 0 additions & 2 deletions eth/tracers/logger/access_list_tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,6 @@ func (a *AccessListTracer) OnStorageChange(addr libcommon.Address, k *libcommon.

func (a *AccessListTracer) OnLog(log *types.Log) {}

func (a *AccessListTracer) OnNewAccount(addr libcommon.Address, reset bool) {}

func (a *AccessListTracer) CaptureExit(output []byte, usedGas uint64, err error, reverted bool) {
}

Expand Down
2 changes: 0 additions & 2 deletions eth/tracers/logger/json_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ func (l *JsonStreamLogger) OnStorageChange(a libcommon.Address, k *libcommon.Has

func (l *JsonStreamLogger) OnLog(log *types.Log) {}

func (l *JsonStreamLogger) OnNewAccount(a libcommon.Address, reset bool) {}

func (l *JsonStreamLogger) CaptureExit(output []byte, usedGas uint64, err error, reverted bool) {
}

Expand Down
4 changes: 0 additions & 4 deletions eth/tracers/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,6 @@ func (l *StructLogger) OnStorageChange(a libcommon.Address, k *libcommon.Hash, p

func (l *StructLogger) OnLog(log *types.Log) {}

func (l *StructLogger) OnNewAccount(a libcommon.Address, reset bool) {}

// CaptureExit is called after the internal call finishes to finalize the tracing.
func (l *StructLogger) CaptureExit(output []byte, usedGas uint64, err error, reverted bool) {
}
Expand Down Expand Up @@ -489,8 +487,6 @@ func (t *mdLogger) OnStorageChange(a libcommon.Address, k *libcommon.Hash, prev,

func (t *mdLogger) OnLog(log *types.Log) {}

func (t *mdLogger) OnNewAccount(a libcommon.Address, reset bool) {}

func (t *mdLogger) CaptureExit(output []byte, usedGas uint64, err error, reverted bool) {
t.captureEndOrExit(output, usedGas, err)
}
Expand Down
2 changes: 0 additions & 2 deletions eth/tracers/logger/logger_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ func (l *JSONLogger) OnStorageChange(a libcommon.Address, k *libcommon.Hash, pre

func (l *JSONLogger) OnLog(log *types.Log) {}

func (l *JSONLogger) OnNewAccount(a libcommon.Address, reset bool) {}

func (l *JSONLogger) CaptureExit(output []byte, usedGas uint64, err error, reverted bool) {
}

Expand Down
6 changes: 0 additions & 6 deletions eth/tracers/native/mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,6 @@ func (t *muxTracer) OnLog(log *types.Log) {
}
}

func (t *muxTracer) OnNewAccount(a libcommon.Address, reset bool) {
for _, t := range t.tracers {
t.OnNewAccount(a, reset)
}
}

// Stop terminates execution of the tracer at the first opportune moment.
func (t *muxTracer) Stop(err error) {
for _, t := range t.tracers {
Expand Down
2 changes: 0 additions & 2 deletions eth/tracers/noop.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ func (*NoopTracer) OnStorageChange(a libcommon.Address, k *libcommon.Hash, prev,

func (*NoopTracer) OnLog(log *types.Log) {}

func (*NoopTracer) OnNewAccount(a libcommon.Address, reset bool) {}

// GetResult returns an empty json object.
func (t *NoopTracer) GetResult() (json.RawMessage, error) {
return json.RawMessage(`{}`), nil
Expand Down
2 changes: 0 additions & 2 deletions turbo/jsonrpc/otterscan_default_tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ func (t *DefaultTracer) OnStorageChange(addr libcommon.Address, k *libcommon.Has

func (t *DefaultTracer) OnLog(log *types.Log) {}

func (t *DefaultTracer) OnNewAccount(addr libcommon.Address, reset bool) {}

func (t *DefaultTracer) CaptureExit(output []byte, usedGas uint64, err error, reverted bool) {
}

Expand Down
2 changes: 0 additions & 2 deletions turbo/jsonrpc/trace_adhoc.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,8 +663,6 @@ func (ot *OeTracer) OnStorageChange(addr libcommon.Address, k *libcommon.Hash, p

func (ot *OeTracer) OnLog(log *types.Log) {}

func (ot *OeTracer) OnNewAccount(addr libcommon.Address, reset bool) {}

func (ot *OeTracer) GetResult() (json.RawMessage, error) {
return json.RawMessage{}, nil
}
Expand Down

0 comments on commit 93b61c7

Please sign in to comment.