diff options
Diffstat (limited to 'trie/trie_test.go')
-rw-r--r-- | trie/trie_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/trie/trie_test.go b/trie/trie_test.go index f9d6029c9..4d84aa96c 100644 --- a/trie/trie_test.go +++ b/trie/trie_test.go @@ -614,3 +614,16 @@ func updateString(trie *Trie, k, v string) { func deleteString(trie *Trie, k string) { trie.Delete([]byte(k)) } + +func TestDecodeNode(t *testing.T) { + t.Parallel() + var ( + hash = make([]byte, 20) + elems = make([]byte, 20) + ) + for i := 0; i < 5000000; i++ { + rand.Read(hash) + rand.Read(elems) + decodeNode(hash, elems, 1) + } +} |