rm OnNewAccount

Backport of 57cd0c30df
This commit is contained in:
Matthieu Vachon 2024-02-08 15:57:12 -05:00
parent 9f71824d8c
commit 31b3b7dca3
4 changed files with 0 additions and 18 deletions

View file

@ -59,10 +59,6 @@ type StateLogger interface {
OnCodeChange(addr common.Address, prevCodeHash common.Hash, prevCode []byte, codeHash common.Hash, code []byte)
OnStorageChange(addr common.Address, slot common.Hash, prev, new common.Hash)
OnLog(log *types.Log)
// OnNewAccount is called when a new account is created.
// Reset indicates an account existed at that address
// which will be replaced.
OnNewAccount(addr common.Address, reset bool)
}
// StateDB structs within the ethereum protocol are used to store anything
@ -662,9 +658,6 @@ func (s *StateDB) GetOrNewStateObject(addr common.Address) *stateObject {
func (s *StateDB) createObject(addr common.Address) (newobj, prev *stateObject) {
prev = s.getDeletedStateObject(addr) // Note, prev might have been deleted, we need that!
newobj = newObject(s, addr, nil)
if s.logger != nil {
s.logger.OnNewAccount(addr, prev != nil)
}
if prev == nil {
s.journal.append(createObjectChange{account: &addr})
} else {

View file

@ -86,8 +86,6 @@ func (*NoopTracer) OnStorageChange(a common.Address, k, prev, new common.Hash) {
func (*NoopTracer) OnLog(log *types.Log) {}
func (*NoopTracer) OnNewAccount(a common.Address, reset bool) {}
// GetResult returns an empty json object.
func (t *NoopTracer) GetResult() (json.RawMessage, error) {
return json.RawMessage(`{}`), nil

View file

@ -91,8 +91,5 @@ func (t *noop) OnLog(l *types.Log) {
}
func (t *noop) OnNewAccount(a common.Address, reset bool) {
}
func (t *noop) OnGasChange(old, new uint64, reason vm.GasChangeReason) {
}

View file

@ -159,12 +159,6 @@ func (t *muxTracer) OnLog(log *types.Log) {
}
}
func (t *muxTracer) OnNewAccount(a common.Address, reset bool) {
for _, t := range t.tracers {
t.OnNewAccount(a, reset)
}
}
// GetResult returns an empty json object.
func (t *muxTracer) GetResult() (json.RawMessage, error) {
resObject := make(map[string]json.RawMessage)