aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2014-01-19 21:06:36 +0800
committerGav Wood <i@gavwood.com>2014-01-19 21:06:36 +0800
commit308b3d2d50ad84f2914e80d267a28b034942b8d6 (patch)
tree7cdaca46160f4651ecc59bf3781eef00856c42e7 /main.cpp
parent06e7cb9a39722c0e1d2f1de561f5d272188790e4 (diff)
downloaddexon-solidity-308b3d2d50ad84f2914e80d267a28b034942b8d6.tar.gz
dexon-solidity-308b3d2d50ad84f2914e80d267a28b034942b8d6.tar.zst
dexon-solidity-308b3d2d50ad84f2914e80d267a28b034942b8d6.zip
Iterators in the TrieDB!
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index 1f49bd86..85d0e768 100644
--- a/main.cpp
+++ b/main.cpp
@@ -119,16 +119,19 @@ int main()
BasicMap m;
GenericTrieDB<BasicMap> t(&m);
t.init(); // initialise as empty tree.
+ cout << t;
cout << m;
cout << t.root() << endl;
cout << hash256(StringMap()) << endl;
t.insert(string("tesz"), string("test"));
+ cout << t;
cout << m;
cout << t.root() << endl;
cout << hash256({{"test", "test"}}) << endl;
t.insert(string("tesa"), string("testy"));
+ cout << t;
cout << m;
cout << t.root() << endl;
cout << hash256({{"test", "test"}, {"te", "testy"}}) << endl;
@@ -152,6 +155,7 @@ int main()
t.init(); // initialise as empty tree.
t.insert(string("a"), string("A"));
t.insert(string("b"), string("B"));
+ cout << t;
cout << m;
cout << t.root() << endl;
cout << hash256({{"b", "B"}, {"a", "A"}}) << endl;
@@ -194,6 +198,7 @@ int main()
cout << endl << "-------------------------------" << endl;
cout << a << " -> " << b << endl;
+ cout << d;
cout << m;
cout << d.root() << endl;
cout << hash256(s) << endl;
@@ -215,6 +220,7 @@ int main()
cout << endl << "-------------------------------" << endl;
cout << "X " << a << endl;
+ cout << d;
cout << m;
cout << d.root() << endl;
cout << hash256(s) << endl;