diff options
author | Martin Holst Swende <martin@swende.se> | 2019-02-16 23:16:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-16 23:16:12 +0800 |
commit | 4f85c2b88b6849def5c8d5b7661efa2cae8ec641 (patch) | |
tree | 35e32afc04194f7fd57c69cdda3bea3a3f1cb3d5 /trie/trie_test.go | |
parent | 5b8ae7885eaa033aaf1fb1d5959b7f1c86761d6d (diff) | |
download | go-tangerine-4f85c2b88b6849def5c8d5b7661efa2cae8ec641.tar go-tangerine-4f85c2b88b6849def5c8d5b7661efa2cae8ec641.tar.gz go-tangerine-4f85c2b88b6849def5c8d5b7661efa2cae8ec641.tar.bz2 go-tangerine-4f85c2b88b6849def5c8d5b7661efa2cae8ec641.tar.lz go-tangerine-4f85c2b88b6849def5c8d5b7661efa2cae8ec641.tar.xz go-tangerine-4f85c2b88b6849def5c8d5b7661efa2cae8ec641.tar.zst go-tangerine-4f85c2b88b6849def5c8d5b7661efa2cae8ec641.zip |
trie: fix error in node decoding (#19111)
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) + } +} |