mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
parent
677f923125
commit
edec80c08f
2 changed files with 5 additions and 3 deletions
|
|
@ -96,7 +96,10 @@ func (s *stateObject) empty() bool {
|
|||
|
||||
// newObject creates a state object.
|
||||
func newObject(db *StateDB, address common.Address, acct *types.StateAccount) *stateObject {
|
||||
origin := acct
|
||||
var (
|
||||
origin = acct
|
||||
created = acct == nil // true if the account was not existent
|
||||
)
|
||||
if acct == nil {
|
||||
acct = types.NewEmptyStateAccount()
|
||||
}
|
||||
|
|
@ -109,6 +112,7 @@ func newObject(db *StateDB, address common.Address, acct *types.StateAccount) *s
|
|||
originStorage: make(Storage),
|
||||
pendingStorage: make(Storage),
|
||||
dirtyStorage: make(Storage),
|
||||
created: created,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -691,8 +691,6 @@ func (s *StateDB) createObject(addr common.Address) (newobj, prev *stateObject)
|
|||
delete(s.storagesOrigin, prev.addrHash)
|
||||
}
|
||||
|
||||
newobj.created = true
|
||||
|
||||
s.setStateObject(newobj)
|
||||
if prev != nil && !prev.deleted {
|
||||
return newobj, prev
|
||||
|
|
|
|||
Loading…
Reference in a new issue