diff --git a/exp/main.cpp b/exp/main.cpp index d31306496..47efe576a 100644 --- a/exp/main.cpp +++ b/exp/main.cpp @@ -34,6 +34,9 @@ #include #include #include +#include +#include +/* #include #include #include @@ -41,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -55,17 +57,43 @@ #include #include #include -#include +#include */ using namespace std; using namespace dev; -using namespace dev::eth; +/*using namespace dev::eth; using namespace dev::p2p; using namespace dev::shh; namespace js = json_spirit; namespace fs = boost::filesystem; - +*/ #if 1 +int main() +{ + cdebug << "EXP"; + vector data; + for (unsigned i = 0; i < 10000; ++i) + data.push_back(rlp(i)); + + h256 ret; + DEV_TIMED(triedb) + { + MemoryDB mdb; + GenericTrieDB t(&mdb); + t.init(); + unsigned i = 0; + for (auto const& d: data) + t.insert(rlp(i++), d); + ret = t.root(); + } + cdebug << ret; + DEV_TIMED(hash256) + ret = orderedTrieRoot(data); + cdebug << ret; +} + +#elif 0 + int main() { KeyManager keyman;