diff options
author | Gav Wood <i@gavwood.com> | 2015-03-02 05:54:05 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2015-03-06 19:45:23 +0800 |
commit | 19324009e1129b7411910865258794b0518eddf8 (patch) | |
tree | 57f15bbb7637ca8c38cd01168013cfbbccbe92a8 /trie.cpp | |
parent | 23f10dae8a8e95cd5302b60ceb70b43cb9e60063 (diff) | |
download | dexon-solidity-19324009e1129b7411910865258794b0518eddf8.tar dexon-solidity-19324009e1129b7411910865258794b0518eddf8.tar.gz dexon-solidity-19324009e1129b7411910865258794b0518eddf8.tar.bz2 dexon-solidity-19324009e1129b7411910865258794b0518eddf8.tar.lz dexon-solidity-19324009e1129b7411910865258794b0518eddf8.tar.xz dexon-solidity-19324009e1129b7411910865258794b0518eddf8.tar.zst dexon-solidity-19324009e1129b7411910865258794b0518eddf8.zip |
State integration test.
Fixes to the FatTrie.
Diffstat (limited to 'trie.cpp')
-rw-r--r-- | trie.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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(); |