From ad13b402d715e120009b3efb6a08d2c90139f31d Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 24 Sep 2014 17:47:01 +0200 Subject: Fixed race condition --- ethtrie/trie.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ethtrie/trie.go') 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)) -- cgit