aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2014-01-08 06:42:33 +0800
committerGav Wood <i@gavwood.com>2014-01-08 06:42:33 +0800
commit7a769e3f397be3f409b0a60c2d3c82aba62e2914 (patch)
treecd52b549789a442b53771474f64f0b58798fed1a /main.cpp
parent58d10e79be361d0c81010b7217c9d2251fdb9f1d (diff)
downloaddexon-solidity-7a769e3f397be3f409b0a60c2d3c82aba62e2914.tar.gz
dexon-solidity-7a769e3f397be3f409b0a60c2d3c82aba62e2914.tar.zst
dexon-solidity-7a769e3f397be3f409b0a60c2d3c82aba62e2914.zip
More testing on new Trie format.
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index ee2ecfcf..551b21ab 100644
--- a/main.cpp
+++ b/main.cpp
@@ -93,9 +93,20 @@ int main()
*/
{
Trie t;
- cout << hex << hash256(StringMap({})) << endl;
+ t.insert("dog", "puppy");
+ cout << hex << t.hash256() << endl;
+ cout << RLP(t.rlp()) << endl;
+ }
+ {
+ Trie t;
+ t.insert("bed", "d");
+ t.insert("be", "e");
cout << hex << t.hash256() << endl;
+ cout << RLP(t.rlp()) << endl;
+ }
+ {
cout << hex << hash256({{"dog", "puppy"}, {"doe", "reindeer"}}) << endl;
+ Trie t;
t.insert("dog", "puppy");
t.insert("doe", "reindeer");
cout << hex << t.hash256() << endl;