Test
This commit is contained in:
@@ -4075,7 +4075,7 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
|
|||||||
CBlockIndex *&pindex = *ppindex;
|
CBlockIndex *&pindex = *ppindex;
|
||||||
if (!AcceptBlockHeader(block, state, &pindex))
|
if (!AcceptBlockHeader(block, state, &pindex))
|
||||||
{
|
{
|
||||||
fprintf(stderr,"AcceptBlockHeader rejected\n");
|
//fprintf(stderr,"AcceptBlockHeader rejected\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ( pindex == 0 )
|
if ( pindex == 0 )
|
||||||
|
|||||||
@@ -487,9 +487,9 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
|||||||
if ( ASSETCHAINS_SYMBOL[0] == 0 && NOTARY_PUBKEY33[0] != 0 && pblock->nTime < pindexPrev->nTime+60 )
|
if ( ASSETCHAINS_SYMBOL[0] == 0 && NOTARY_PUBKEY33[0] != 0 && pblock->nTime < pindexPrev->nTime+60 )
|
||||||
{
|
{
|
||||||
pblock->nTime = pindexPrev->nTime + 60;
|
pblock->nTime = pindexPrev->nTime + 60;
|
||||||
fprintf(stderr,"block.nTime %u vs prev.%u, gettime.%u vs adjusted.%u\n",(uint32_t)pblock->nTime,(uint32_t)(pindexPrev->nTime + 60),(uint32_t)pblock->GetBlockTime(),(uint32_t)(GetAdjustedTime() + 60));
|
|
||||||
while ( pblock->GetBlockTime() > GetAdjustedTime() + 60 )
|
while ( pblock->GetBlockTime() > GetAdjustedTime() + 60 )
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
fprintf(stderr,"block.nTime %u vs prev.%u, gettime.%u vs adjusted.%u\n",(uint32_t)pblock->nTime,(uint32_t)(pindexPrev->nTime + 60),(uint32_t)pblock->GetBlockTime(),(uint32_t)(GetAdjustedTime() + 60));
|
||||||
}
|
}
|
||||||
pblock->nSolution.clear();
|
pblock->nSolution.clear();
|
||||||
pblocktemplate->vTxSigOps[0] = GetLegacySigOpCount(pblock->vtx[0]);
|
pblocktemplate->vTxSigOps[0] = GetLegacySigOpCount(pblock->vtx[0]);
|
||||||
@@ -934,9 +934,9 @@ void static BitcoinMiner()
|
|||||||
if ( Mining_start != 0 && time(NULL) < Mining_start+roundrobin_delay )
|
if ( Mining_start != 0 && time(NULL) < Mining_start+roundrobin_delay )
|
||||||
{
|
{
|
||||||
//printf("Round robin diff sleep %d\n",(int32_t)(Mining_start+roundrobin_delay-time(NULL)));
|
//printf("Round robin diff sleep %d\n",(int32_t)(Mining_start+roundrobin_delay-time(NULL)));
|
||||||
int32_t nseconds = Mining_start+roundrobin_delay-time(NULL);
|
//int32_t nseconds = Mining_start+roundrobin_delay-time(NULL);
|
||||||
if ( nseconds > 0 )
|
//if ( nseconds > 0 )
|
||||||
sleep(nseconds);
|
// sleep(nseconds);
|
||||||
MilliSleep((rand() % 1700) + 1);
|
MilliSleep((rand() % 1700) + 1);
|
||||||
}
|
}
|
||||||
else if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
else if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user