Skip to content

Commit bebee0c

Browse files
committed
wip
1 parent c1b8965 commit bebee0c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

libdevcore/IpfsHash.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ bytes dev::ipfsHash(string _data)
7878

7979
cout << toHex(blockData) << endl;
8080
cout << toHex(blockData.size()) << endl;
81+
cout << "Hash: " << toHex(picosha2::hash256(std::move(blockData))) << endl;
8182
// Multihash: sha2-256, 256 bits
8283
bytes hash = bytes{0x12, 0x20} + picosha2::hash256(std::move(blockData));
8384
return hash;

test/libdevcore/IpfsHash.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ BOOST_AUTO_TEST_CASE(test_small)
4545
BOOST_AUTO_TEST_CASE(test_medium)
4646
{
4747
// 131000 works, 131071 does not.
48-
size_t length = 131000;//131071;
48+
// TODO it seems to be an error in the sha2 library, though.
49+
size_t length = 131071;//131071;
4950
string data;
5051
data.resize(length, 0);
5152
BOOST_REQUIRE_EQUAL(data.size(), length);

0 commit comments

Comments
 (0)