Fixed race condition

This commit is contained in:
obscuren 2014-09-24 17:47:01 +02:00
parent ba43364f36
commit ad13b402d7
1 changed files with 2 additions and 2 deletions

View File

@ -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))