diff options
author | obscuren <geffobscura@gmail.com> | 2014-09-24 23:47:01 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-09-24 23:47:01 +0800 |
commit | ad13b402d715e120009b3efb6a08d2c90139f31d (patch) | |
tree | 631909593ca57f97297482caf3eabe22d4bcea6f | |
parent | ba43364f36db690528cc62196969414ef5e98833 (diff) | |
download | go-tangerine-ad13b402d715e120009b3efb6a08d2c90139f31d.tar go-tangerine-ad13b402d715e120009b3efb6a08d2c90139f31d.tar.gz go-tangerine-ad13b402d715e120009b3efb6a08d2c90139f31d.tar.bz2 go-tangerine-ad13b402d715e120009b3efb6a08d2c90139f31d.tar.lz go-tangerine-ad13b402d715e120009b3efb6a08d2c90139f31d.tar.xz go-tangerine-ad13b402d715e120009b3efb6a08d2c90139f31d.tar.zst go-tangerine-ad13b402d715e120009b3efb6a08d2c90139f31d.zip |
Fixed race condition
-rw-r--r-- | ethtrie/trie.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ethtrie/trie.go b/ethtrie/trie.go index e6e09dd0d..695ff436a 100644 --- a/ethtrie/trie.go +++ b/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)) |