Browse Source

Check StorageRoot for Zero before state.Load() again. Closes #36

pull/37/head
Ethan Buchman 9 years ago
parent
commit
54e222866a
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      state/vm_app_state.go

+ 7
- 2
state/vm_app_state.go View File

@ -229,8 +229,13 @@ func (vas *VMAppState) Sync() {
if deleted {
continue
}
storageRoot := currentAccount.StorageRoot
storage.Load(storageRoot.Bytes())
var storageRoot []byte
if currentAccount.StorageRoot.IsZero() {
storageRoot = nil
} else {
storageRoot = currentAccount.StorageRoot.Bytes()
}
storage.Load(storageRoot)
}
if value.IsZero() {
_, removed := storage.Remove(key)


Loading…
Cancel
Save