rm OnNewAccount
This commit is contained in:
parent
2cc09548bb
commit
57cd0c30df
|
@ -60,10 +60,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
|
||||
|
@ -663,9 +659,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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue