This commit is contained in:
jl777
2016-11-29 18:16:56 -03:00
parent 71e8e95fb6
commit 5aab039262
2 changed files with 9 additions and 2 deletions

View File

@@ -486,7 +486,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
hwmheight = pindex->nHeight;
else
{
printf("hwmheight.%d vs pindex->nHeight.%d t.%u reorg.%d\n",hwmheight,pindex->nHeight,(uint32_t)pindex->nTime,hwmheight-pindex->nHeight);
printf("%s hwmheight.%d vs pindex->nHeight.%d t.%u reorg.%d\n",ASSETCHAINS_SYMBOL,hwmheight,pindex->nHeight,(uint32_t)pindex->nTime,hwmheight-pindex->nHeight);
komodo_event_rewind(sp,symbol,pindex->nHeight);
komodo_stateupdate(pindex->nHeight,0,0,0,zero,0,0,0,0,-pindex->nHeight,pindex->nTime,0,0,0,0);
}

View File

@@ -450,6 +450,7 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int&
//
// Internal miner
//
int8_t komodo_minerid(int32_t height);
CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey)
{
@@ -472,6 +473,12 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey)
script[34] = OP_CHECKSIG;
//scriptPubKey = CScript() << ToByteVector(pubkey) << OP_CHECKSIG;
}
if ( ASSETCHAINS_SYMBOL[0] == 0 )
{
for (i=0; i<65; i++)
fprintf(stderr,"%d ",komodo_minerid(activeChain.Tip()->nHeight-i));
fprintf(stderr," minerids from ht.%d\n",activeChain.Tip()->nHeight);
}
return CreateNewBlock(scriptPubKey);
}
@@ -739,7 +746,7 @@ void static BitcoinMiner(CWallet *pwallet)
// Regtest mode doesn't require peers
if (vNodes.empty() && chainparams.MiningRequiresPeers())
{
if ( ASSETCHAINS_SYMBOL[0] == 0 || Mining_height >= 100 )
if ( ASSETCHAINS_SYMBOL[0] == 0 || Mining_height > 100 )
{
//fprintf(stderr,"no nodes, break\n");
break;