From 1274fe5b1d4ec998415c1a60264feeff029c71f0 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 27 Oct 2019 07:11:21 -0400 Subject: [PATCH] Fix WaitForShutdown, which was broken by earlytxid stuff --- src/bitcoind.cpp | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index ea82a9861..5cd8f795a 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -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();