core/statedb: Don't journal the setBalance call when fetching existing state objects

This commit is contained in:
Nick Johnson 2016-10-05 10:24:09 +01:00
parent ea15cacd24
commit a604209662

View file

@ -421,9 +421,9 @@ func (self *StateDB) createStateObject(addr common.Address) *StateObject {
// Create a new one // Create a new one
newSo := self.newStateObject(addr) newSo := self.newStateObject(addr)
// If it existed set the balance to the new account. This also creates a journal entry. // If it existed set the balance to the new account.
if so != nil { if so != nil {
newSo.SetBalance(so.data.Balance) newSo.setBalance(so.data.Balance)
} else { } else {
self.journal = append(self.journal, createAccountChange{account: &addr}) self.journal = append(self.journal, createAccountChange{account: &addr})
} }