Fix WaitForShutdown, which was broken by earlytxid stuff
This commit is contained in:
@@ -71,32 +71,9 @@ CBlockIndex *komodo_chainactive(int32_t height);
|
||||
void WaitForShutdown(boost::thread_group* threadGroup)
|
||||
{
|
||||
int32_t i,height; CBlockIndex *pindex; bool fShutdown = ShutdownRequested(); const uint256 zeroid;
|
||||
fprintf(stderr,"%s: fShutdown=%d, KOMODO_EARLYTXID_HEIGHT=%d\n", __FUNCTION__, fShutdown, KOMODO_EARLYTXID_HEIGHT);
|
||||
//fprintf(stderr,"%s: fShutdown=%d, KOMODO_EARLYTXID_HEIGHT=%d\n", __FUNCTION__, fShutdown, KOMODO_EARLYTXID_HEIGHT);
|
||||
//fprintf(stderr,"%s: earlytxid=%s, tx_height=%d\n", __FUNCTION__, KOMODO_EARLYTXID.GetHex(), tx_height(KOMODO_EARLYTXID) );
|
||||
|
||||
height=tx_height(KOMODO_EARLYTXID);
|
||||
// Tell the main threads to shutdown.
|
||||
StartShutdown();
|
||||
/*
|
||||
if (komodo_currentheight()>KOMODO_EARLYTXID_HEIGHT && KOMODO_EARLYTXID!=zeroid && ((height=tx_height(KOMODO_EARLYTXID))==0 || height>KOMODO_EARLYTXID_HEIGHT))
|
||||
{
|
||||
fprintf(stderr,"error: earlytx must be before block height %d or tx does not exist\n",KOMODO_EARLYTXID_HEIGHT);
|
||||
StartShutdown();
|
||||
} else {
|
||||
fprintf(stderr,"%s: Not true\n", __FUNCTION__);
|
||||
}
|
||||
*/
|
||||
fprintf(stderr,"%s: komodo_currentheight=%d\n", __FUNCTION__, komodo_currentheight() );
|
||||
//fprintf(stderr,"%s: earlytx height=%d, ASSETCHAINS_CBOPRET=%li\n", __FUNCTION__, height, ASSETCHAINS_CBOPRET);
|
||||
|
||||
/*if ( ASSETCHAINS_STAKED == 0 && ASSETCHAINS_ADAPTIVEPOW == 0 && (pindex= komodo_chainactive(1)) != 0 )
|
||||
{
|
||||
if ( pindex->nTime > ADAPTIVEPOW_CHANGETO_DEFAULTON )
|
||||
{
|
||||
ASSETCHAINS_ADAPTIVEPOW = 1;
|
||||
fprintf(stderr,"default activate adaptivepow\n");
|
||||
} else fprintf(stderr,"height1 time %u vs %u\n",pindex->nTime,ADAPTIVEPOW_CHANGETO_DEFAULTON);
|
||||
} //else fprintf(stderr,"cant find height 1\n");*/
|
||||
//fprintf(stderr,"%s: komodo_currentheight=%d\n", __FUNCTION__, komodo_currentheight() );
|
||||
|
||||
if ( ASSETCHAINS_CBOPRET != 0 ) {
|
||||
komodo_pricesinit();
|
||||
|
||||
Reference in New Issue
Block a user