From 308b3d2d50ad84f2914e80d267a28b034942b8d6 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 19 Jan 2014 13:06:36 +0000 Subject: [PATCH] Iterators in the TrieDB! --- main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.cpp b/main.cpp index 1f49bd86a..85d0e768b 100644 --- a/main.cpp +++ b/main.cpp @@ -119,16 +119,19 @@ int main() BasicMap m; GenericTrieDB 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;