diff options
author | CJentzsch <jentzsch.software@gmail.com> | 2015-04-17 15:03:10 +0800 |
---|---|---|
committer | CJentzsch <jentzsch.software@gmail.com> | 2015-04-17 15:03:10 +0800 |
commit | aadffe35540d446a5723768abbe41ef841a98de6 (patch) | |
tree | 24e50774fe43dae51a95121909aa4bb5dc3b97fd /dagger.cpp | |
parent | 3d199bf4d50206077c0d84122ff0ef70fc174d10 (diff) | |
parent | 0f9b0f3bc4fbebb2ab956f0178ec82442065b1bc (diff) | |
download | dexon-solidity-aadffe35540d446a5723768abbe41ef841a98de6.tar dexon-solidity-aadffe35540d446a5723768abbe41ef841a98de6.tar.gz dexon-solidity-aadffe35540d446a5723768abbe41ef841a98de6.tar.bz2 dexon-solidity-aadffe35540d446a5723768abbe41ef841a98de6.tar.lz dexon-solidity-aadffe35540d446a5723768abbe41ef841a98de6.tar.xz dexon-solidity-aadffe35540d446a5723768abbe41ef841a98de6.tar.zst dexon-solidity-aadffe35540d446a5723768abbe41ef841a98de6.zip |
Merge remote-tracking branch 'upstream/develop' into addTests
Conflicts:
test/bcUncleHeaderValiditiyFiller.json
Diffstat (limited to 'dagger.cpp')
-rw-r--r-- | dagger.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -25,7 +25,7 @@ #include "JsonSpiritHeaders.h" #include <libdevcore/CommonIO.h> #include <libethcore/ProofOfWork.h> -#include <libethcore/Ethasher.h> +#include <libethcore/EthashAux.h> #include <boost/test/unit_test.hpp> #include "TestHelper.h" @@ -63,18 +63,18 @@ BOOST_AUTO_TEST_CASE(basic_test) unsigned cacheSize(o["cache_size"].get_int()); h256 cacheHash(o["cache_hash"].get_str()); - BOOST_REQUIRE_EQUAL(Ethasher::get()->params(header).cache_size, cacheSize); - BOOST_REQUIRE_EQUAL(sha3(bytesConstRef((byte const*)Ethasher::get()->light(header), cacheSize)), cacheHash); + BOOST_REQUIRE_EQUAL(EthashAux::get()->params(header).cache_size, cacheSize); + BOOST_REQUIRE_EQUAL(sha3(EthashAux::get()->light(header)->data()), cacheHash); #if TEST_FULL unsigned fullSize(o["full_size"].get_int()); h256 fullHash(o["full_hash"].get_str()); - BOOST_REQUIRE_EQUAL(Ethasher::get()->full(header).size(), fullSize); - BOOST_REQUIRE_EQUAL(sha3(Ethasher::get()->full(header)), fullHash); + BOOST_REQUIRE_EQUAL(EthashAux::get()->full(header).size(), fullSize); + BOOST_REQUIRE_EQUAL(sha3(EthashAux::get()->full(header)), fullHash); #endif h256 result(o["result"].get_str()); - Ethasher::Result r = Ethasher::eval(header); + Ethash::Result r = EthashAux::eval(header); BOOST_REQUIRE_EQUAL(r.value, result); BOOST_REQUIRE_EQUAL(r.mixHash, header.mixHash); } |