Title: Concatenating two byte arrays (ss << pindex->hashProof << 0x0000000000000000) Post by: janko33 on August 13, 2014, 08:32:45 PM How do I do this in bitcoinj?
0x0000000000000000 is uint64_t am stuck on this for 2 weeks :( I think somebody from here can help me to see what did I do wrong or can you point me to. c++ code ss << pindex->hashProof << 0x0000000000000000; uint256 hashSelection = Hash(ss.begin(), ss.end()); c++ code How do I port these 2 lines to java using bitcoinj? can I use BigInteger.compareTo for comparing hashSelection(uint256) ? Can somebody help me? This is my attempt but I think it's wrong! for example for hashProof = 1faef25dec4fbcf906e6242621df2c183bf232f263d0ba5b101911e4563 I get hashSelection.toString(16) f1d854c7a268dcebc4b40a9ef954300f681a56796621469c63d643e29f7e7a81 but I should get bb245d8baac1fd953cc6a0a6ec6ea6339d2ab755ebbb3801cd2c4c7268f5bd5e Code: //256 = 32, 64 = 8 Title: Re: Concatenating two byte arrays (ss << pindex->hashProof << 0x0000000000000000) Post by: janko33 on August 14, 2014, 04:11:02 PM studied studied studied and studied and than corrected ;DD
you know where the error is? here ssStakeStream.write(Utils.reverseBytes(arrayHashProof)); |