Immediate submit block from miner

This commit is contained in:
jl777
2018-04-20 22:44:01 +03:00
parent c685d69264
commit 0d8e3988e9

View File

@@ -635,7 +635,7 @@ static bool ProcessBlockFound(CBlock* pblock)
return error("KomodoMiner: ProcessNewBlock, block not accepted"); return error("KomodoMiner: ProcessNewBlock, block not accepted");
TrackMinedBlock(pblock->GetHash()); TrackMinedBlock(pblock->GetHash());
if ( vNodes.size() < KOMODO_LIMITED_NETWORKSIZE*2 ) //if ( vNodes.size() < KOMODO_LIMITED_NETWORKSIZE*2 )
{ {
int32_t n = 1; int32_t n = 1;
//fprintf(stderr,"broadcast new block t.%u\n",(uint32_t)time(NULL)); //fprintf(stderr,"broadcast new block t.%u\n",(uint32_t)time(NULL));
@@ -648,7 +648,8 @@ static bool ProcessBlockFound(CBlock* pblock)
if ( (rand() % n) == 0 ) if ( (rand() % n) == 0 )
{ {
pnode->PushMessage("block", *pblock); pnode->PushMessage("block", *pblock);
n++; if ( n++ > 8 )
break;
} }
} }
} }