state: fireEvents flag on ExecTx and fixes for GetAccount

This commit is contained in:
Ethan Buchman
2015-04-14 19:26:55 -07:00
parent b4388ae010
commit 34098edb93
4 changed files with 15 additions and 6 deletions
+4 -2
View File
@@ -53,7 +53,9 @@ func (cache *BlockCache) GetAccount(addr []byte) *ac.Account {
return acc
} else {
acc = cache.backend.GetAccount(addr)
cache.accounts[string(addr)] = accountInfo{acc, nil, false, false}
if acc != nil {
cache.accounts[string(addr)] = accountInfo{acc, nil, false, false}
}
return acc
}
}
@@ -187,7 +189,7 @@ func (cache *BlockCache) Sync() {
}
} else {
if acc == nil {
panic(Fmt("Account should not be nil for addr: %X", acc.Address))
panic(Fmt("Account should not be nil for addr: %x", addrStr))
}
if storage != nil {
newStorageRoot := storage.Save()