add dirty bit to BlockCache accounts and storages.

construct account’s storage lazily.
This commit is contained in:
Jae Kwon
2015-03-29 17:47:12 -07:00
parent 4be97fa9d4
commit 42e2e11364
2 changed files with 49 additions and 26 deletions
+2 -4
View File
@@ -94,10 +94,8 @@ func (cache *TxCache) GetStorage(addr Word256, key Word256) Word256 {
return value
}
// Load and set cache
value = cache.backend.GetStorage(addr, key)
cache.storages[Tuple256{addr, key}] = value
return value
// Load from backend
return cache.backend.GetStorage(addr, key)
}
// NOTE: Set value to zero to removed from the trie.