diff options
Diffstat (limited to 'ethutil/trie_test.go')
-rw-r--r-- | ethutil/trie_test.go | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/ethutil/trie_test.go b/ethutil/trie_test.go index d8db8a0d6..542af5504 100644 --- a/ethutil/trie_test.go +++ b/ethutil/trie_test.go @@ -242,7 +242,6 @@ func TestRemote(t *testing.T) { for key, value := range test.In { trie.Update(get(key), get(value)) } - fmt.Printf("%-15s: %x\n", test.Name, trie.Root) a := NewValue(h(test.Root)).Bytes() b := NewValue(trie.Root).Bytes() @@ -271,3 +270,23 @@ func TestTrieReplay(t *testing.T) { } }) } + +func TestIt(t *testing.T) { + _, trie := New() + + test := map[string]string{ + "0x000000000000000000000000ec4f34c97e43fbb2816cfd95e388353c7181dab1": "0x4e616d6552656700000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000045": "0x22b224a1420a802ab51d326e29fa98e34c4f24ea", + "0x0000000000000000000000000000000000000000000000000000000000000046": "0x67706c2076330000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000697c7b8c961b56f675d570498424ac8de1a918f6": "0x6f6f6f6820736f2067726561742c207265616c6c6c793f000000000000000000", + "0x0000000000000000000000007ef9e639e2733cb34e4dfc576d4b23f72db776b2": "0x4655474156000000000000000000000000000000000000000000000000000000", + "0x6f6f6f6820736f2067726561742c207265616c6c6c793f000000000000000000": "0x697c7b8c961b56f675d570498424ac8de1a918f6", + "0x4655474156000000000000000000000000000000000000000000000000000000": "0x7ef9e639e2733cb34e4dfc576d4b23f72db776b2", + "0x4e616d6552656700000000000000000000000000000000000000000000000000": "0xec4f34c97e43fbb2816cfd95e388353c7181dab1", + } + + for k, v := range test { + trie.Update(k, v) + } + fmt.Printf("root : %x\n", trie.Root) +} |