aboutsummaryrefslogtreecommitdiffstats
path: root/trie.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'trie.cpp')
-rw-r--r--trie.cpp20
1 files changed, 20 insertions, 0 deletions
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<MemoryDB> 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<MemoryDB> 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();