|
|
@ -481,12 +481,13 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn,int32_t gpucount) |
|
|
|
pblock->nTime = pindexPrev->nTime + 60; |
|
|
|
if ( gpucount < 33 ) |
|
|
|
{ |
|
|
|
uint8_t tmpbuffer[40]; int32_t n=0; bits256 randvals; |
|
|
|
uint8_t tmpbuffer[40]; uint32_t r; int32_t n=0; uint256 randvals; |
|
|
|
memcpy(&tmpbuffer[n],&My_notaryid,sizeof(My_notaryid)), n += sizeof(My_notaryid); |
|
|
|
memcpy(&tmpbuffer[n],&Mining_height,sizeof(Mining_height)), n += sizeof(Mining_height); |
|
|
|
memcpy(&tmpbuffer[n],&pblock->hashPrevBlock,sizeof(pblock->hashPrevBlock)), n += sizeof(pblock->hashPrevBlock); |
|
|
|
vcalc_sha256(0,randvals.bytes,tmpbuffer,n); |
|
|
|
pblock->nTime += (randvals.uints[0] % (33 - gpucount)*(33 - gpucount)); |
|
|
|
vcalc_sha256(0,(void *)&randvals,tmpbuffer,n); |
|
|
|
memcpy(&r,&randvals,sizeof(r)); |
|
|
|
pblock->nTime += (r % (33 - gpucount)*(33 - gpucount)); |
|
|
|
} |
|
|
|
if ( komodo_notaryvin(txNotary,NOTARY_PUBKEY33) > 0 ) |
|
|
|
{ |
|
|
|