mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 06:31:57 +00:00
add dirty bit to BlockCache accounts and storages.
construct account’s storage lazily.
This commit is contained in:
+2
-4
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user