Fixed race condition

pull/150/head
obscuren 10 years ago
parent ba43364f36
commit ad13b402d7
  1. 4
      ethtrie/trie.go

@ -196,8 +196,8 @@ func (t *Trie) Update(key, value string) {
}
func (t *Trie) Get(key string) string {
t.mut.RLock()
defer t.mut.RUnlock()
t.mut.Lock()
defer t.mut.Unlock()
k := CompactHexDecode(key)
c := ethutil.NewValue(t.getState(t.Root, k))

Loading…
Cancel
Save