mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-25 02:31:46 +00:00
Check StorageRoot for Zero before state.Load() again. Closes #36
This commit is contained in:
@ -229,8 +229,13 @@ func (vas *VMAppState) Sync() {
|
|||||||
if deleted {
|
if deleted {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
storageRoot := currentAccount.StorageRoot
|
var storageRoot []byte
|
||||||
storage.Load(storageRoot.Bytes())
|
if currentAccount.StorageRoot.IsZero() {
|
||||||
|
storageRoot = nil
|
||||||
|
} else {
|
||||||
|
storageRoot = currentAccount.StorageRoot.Bytes()
|
||||||
|
}
|
||||||
|
storage.Load(storageRoot)
|
||||||
}
|
}
|
||||||
if value.IsZero() {
|
if value.IsZero() {
|
||||||
_, removed := storage.Remove(key)
|
_, removed := storage.Remove(key)
|
||||||
|
Reference in New Issue
Block a user