From 19324009e1129b7411910865258794b0518eddf8 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 1 Mar 2015 22:54:05 +0100 Subject: State integration test. Fixes to the FatTrie. --- trie.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'trie.cpp') diff --git a/trie.cpp b/trie.cpp index 18e115da..84d0e846 100644 --- a/trie.cpp +++ b/trie.cpp @@ -54,6 +54,26 @@ using dev::operator <<; BOOST_AUTO_TEST_SUITE(TrieTests) +BOOST_AUTO_TEST_CASE(fat_trie) +{ + h256 r; + MemoryDB fm; + { + FatGenericTrieDB ft(&fm); + ft.init(); + ft.insert(h256("69", h256::FromHex, h256::AlignRight).ref(), h256("414243", h256::FromHex, h256::AlignRight).ref()); + for (auto i: ft) + cnote << i.first << i.second; + r = ft.root(); + } + { + FatGenericTrieDB ft(&fm); + ft.setRoot(r); + for (auto i: ft) + cnote << i.first << i.second; + } +} + BOOST_AUTO_TEST_CASE(trie_test_anyorder) { string testPath = test::getTestPath(); -- cgit v1.2.3