@@ -41,7 +41,7 @@ void WaitForShutdown(boost::thread_group* threadGroup)
|
|||||||
// Tell the main threads to shutdown.
|
// Tell the main threads to shutdown.
|
||||||
while (!fShutdown)
|
while (!fShutdown)
|
||||||
{
|
{
|
||||||
MilliSleep(16000);
|
MilliSleep(10000);
|
||||||
komodo_passport_iteration();
|
komodo_passport_iteration();
|
||||||
fShutdown = ShutdownRequested();
|
fShutdown = ShutdownRequested();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -466,8 +466,17 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to
|
|||||||
if ( tokomodo == 0 )
|
if ( tokomodo == 0 )
|
||||||
{
|
{
|
||||||
opcode = 'I';
|
opcode = 'I';
|
||||||
if ( komodo_isrealtime(&ht) == 0 )
|
for (i=0; i<10; i++)
|
||||||
|
{
|
||||||
|
if ( komodo_isrealtime(&ht) != 0 )
|
||||||
|
break;
|
||||||
|
sleep(1);
|
||||||
|
}
|
||||||
|
if ( i == 10 )
|
||||||
|
{
|
||||||
|
printf("%s not realtime ht.%d\n",ASSETCHAINS_SYMBOL,ht);
|
||||||
return(0);
|
return(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -484,6 +493,8 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to
|
|||||||
if ( kmdsp != 0 && (kmdsp->NOTARIZED_HEIGHT >= pax->height || kmdsp->CURRENT_HEIGHT > pax->height+30) ) // assumes same chain as notarize
|
if ( kmdsp != 0 && (kmdsp->NOTARIZED_HEIGHT >= pax->height || kmdsp->CURRENT_HEIGHT > pax->height+30) ) // assumes same chain as notarize
|
||||||
pax->validated = pax->komodoshis; //kmdsp->NOTARIZED_HEIGHT;
|
pax->validated = pax->komodoshis; //kmdsp->NOTARIZED_HEIGHT;
|
||||||
else pax->validated = pax->ready = 0;
|
else pax->validated = pax->ready = 0;
|
||||||
|
#else
|
||||||
|
pax->validated = pax->komodoshis;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if ( ASSETCHAINS_SYMBOL[0] != 0 && (pax_fiatstatus(&available,&deposited,&issued,&withdrawn,&approved,&redeemed,symbol) != 0 || available < pax->fiatoshis) )
|
if ( ASSETCHAINS_SYMBOL[0] != 0 && (pax_fiatstatus(&available,&deposited,&issued,&withdrawn,&approved,&redeemed,symbol) != 0 || available < pax->fiatoshis) )
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
|||||||
{
|
{
|
||||||
//fprintf(stderr,"INITDONE.%d RT.%d deposits %.8f ht.%d\n",KOMODO_INITDONE,isrealtime,(double)deposits/COIN,kmdheight);
|
//fprintf(stderr,"INITDONE.%d RT.%d deposits %.8f ht.%d\n",KOMODO_INITDONE,isrealtime,(double)deposits/COIN,kmdheight);
|
||||||
}
|
}
|
||||||
else if ( deposits != 0 || (int32_t)mempool.GetTotalTxSize() > 0 )
|
else if ( komodo_isrealtime(&kmdheight) != 0 && (deposits != 0 || (int32_t)mempool.GetTotalTxSize() > 0) )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"start CreateNewBlock %s initdone.%d deposit %.8f mempool.%d RT.%u KOMODO_ON_DEMAND.%d\n",ASSETCHAINS_SYMBOL,KOMODO_INITDONE,(double)komodo_paxtotal()/COIN,(int32_t)mempool.GetTotalTxSize(),isrealtime,KOMODO_ON_DEMAND);
|
fprintf(stderr,"start CreateNewBlock %s initdone.%d deposit %.8f mempool.%d RT.%u KOMODO_ON_DEMAND.%d\n",ASSETCHAINS_SYMBOL,KOMODO_INITDONE,(double)komodo_paxtotal()/COIN,(int32_t)mempool.GetTotalTxSize(),isrealtime,KOMODO_ON_DEMAND);
|
||||||
break;
|
break;
|
||||||
@@ -400,7 +400,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
|||||||
else if ( komodo_is_issuer() != 0 )
|
else if ( komodo_is_issuer() != 0 )
|
||||||
{
|
{
|
||||||
komodo_gateway_deposits(&txNew,ASSETCHAINS_SYMBOL,0);
|
komodo_gateway_deposits(&txNew,ASSETCHAINS_SYMBOL,0);
|
||||||
if ( txNew.vout.size() > 1 )
|
//if ( txNew.vout.size() > 1 )
|
||||||
fprintf(stderr,"%s txNew numvouts.%d\n",ASSETCHAINS_SYMBOL,(int32_t)txNew.vout.size());
|
fprintf(stderr,"%s txNew numvouts.%d\n",ASSETCHAINS_SYMBOL,(int32_t)txNew.vout.size());
|
||||||
}
|
}
|
||||||
pblock->vtx[0] = txNew;
|
pblock->vtx[0] = txNew;
|
||||||
|
|||||||
Reference in New Issue
Block a user