test
This commit is contained in:
@@ -486,7 +486,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block)
|
|||||||
hwmheight = pindex->nHeight;
|
hwmheight = pindex->nHeight;
|
||||||
else
|
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_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);
|
komodo_stateupdate(pindex->nHeight,0,0,0,zero,0,0,0,0,-pindex->nHeight,pindex->nTime,0,0,0,0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -450,6 +450,7 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int&
|
|||||||
//
|
//
|
||||||
// Internal miner
|
// Internal miner
|
||||||
//
|
//
|
||||||
|
int8_t komodo_minerid(int32_t height);
|
||||||
|
|
||||||
CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey)
|
CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey)
|
||||||
{
|
{
|
||||||
@@ -472,6 +473,12 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey)
|
|||||||
script[34] = OP_CHECKSIG;
|
script[34] = OP_CHECKSIG;
|
||||||
//scriptPubKey = CScript() << ToByteVector(pubkey) << 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);
|
return CreateNewBlock(scriptPubKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -739,7 +746,7 @@ void static BitcoinMiner(CWallet *pwallet)
|
|||||||
// Regtest mode doesn't require peers
|
// Regtest mode doesn't require peers
|
||||||
if (vNodes.empty() && chainparams.MiningRequiresPeers())
|
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");
|
//fprintf(stderr,"no nodes, break\n");
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user