Conversation
src/miner.cpp
Outdated
There was a problem hiding this comment.
Not that I care much about this debug output line but you're aware pblock->nBits is not the same as hashTarget?
|
@sipa I assumed HexStr(pblock->nBits) was going to be equivalent to uint256().SetCompact(pblock->nBits).GetHex() but I didn't tested the output. I can leave as it was. @laanwj using strprintf("%08x", nBits) to replace HexBits instead of defining the new specialized HexStr seems better (less additions, the same deletions) if the outputs are equivalent. Would this serve for the case sipa is discussing too? Either way seems better to remove HexBits, which is just too specific. |
|
@jtimon No, it wouldn't address sipa's problem. Let's leave the line in CheckWork as it is, as I see it it doesn't even use hexbits? |
|
No, it doesn't, I thought that could be a use outside of the rpc stuff, but yeah, I'll just leave it as it was. |
|
OK! |
|
Untested ACK. |
|
Yep, this won't show up on the automatic tests so it will need to be tested manually. |
|
u-t ACK |
|
Tested both functions in an independent program and they produce the same results. |
|
ACK |
|
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4422_645d497aa0010525441ce409e8e6d327a157ab39/ for binaries and test log. |
645d497 Replace HexBits with strprintf (jtimon)
Get rid of HexBits.