This commit is contained in:
jl777
2018-04-19 15:19:58 +03:00
parent fb3cd913ef
commit 2ae7e0b5fa

View File

@@ -894,11 +894,12 @@ void static BitcoinMiner()
[&pblock, &hashTarget, &m_cs, &cancelSolver, &chainparams] [&pblock, &hashTarget, &m_cs, &cancelSolver, &chainparams]
#endif #endif
(std::vector<unsigned char> soln) { (std::vector<unsigned char> soln) {
int32_t z; arith_uint256 h = UintToArith256(pblock->GetHash()); int32_t z; arith_uint256 h;
// Write the solution to the hash and compute the result. // Write the solution to the hash and compute the result.
LogPrint("pow", "- Checking solution against target\n"); LogPrint("pow", "- Checking solution against target\n");
pblock->nSolution = soln; pblock->nSolution = soln;
solutionTargetChecks.increment(); solutionTargetChecks.increment();
h = UintToArith256(pblock->GetHash());
if ( NOTARY_PUBKEY33[0] == 0 && ASSETCHAINS_STAKED > 0 && ASSETCHAINS_STAKED < 100 ) if ( NOTARY_PUBKEY33[0] == 0 && ASSETCHAINS_STAKED > 0 && ASSETCHAINS_STAKED < 100 )
{ {
if ( h > HASHTarget_POW ) if ( h > HASHTarget_POW )
@@ -921,6 +922,7 @@ void static BitcoinMiner()
CValidationState state; CValidationState state;
if ( !TestBlockValidity(state, *pblock, chainActive.Tip(), true, false)) if ( !TestBlockValidity(state, *pblock, chainActive.Tip(), true, false))
{ {
h = UintToArith256(pblock->GetHash());
for (z=31; z>=0; z--) for (z=31; z>=0; z--)
fprintf(stderr,"%02x",((uint8_t *)&h)[z]); fprintf(stderr,"%02x",((uint8_t *)&h)[z]);
fprintf(stderr," Invalid block mined, try again\n"); fprintf(stderr," Invalid block mined, try again\n");