EARLYTXID fixes (#28)

This commit is contained in:
Mihailo Milenkovic
2019-07-09 16:07:25 +02:00
committed by GitHub
parent a7fe381748
commit 4ff591e40d
3 changed files with 14 additions and 15 deletions

View File

@@ -68,8 +68,13 @@ void komodo_cbopretupdate(int32_t forceflag);
void WaitForShutdown(boost::thread_group* threadGroup)
{
int32_t i; bool fShutdown = ShutdownRequested();
int32_t i,height; bool fShutdown = ShutdownRequested(); const uint256 zeroid;
// Tell the main threads to shutdown.
if (komodo_currentheight()>100 && KOMODO_EARLYTXID!=zeroid && ((height=tx_height(KOMODO_EARLYTXID))==0 || height>100))
{
fprintf(stderr,"error: earlytx must be before block height 100 or tx does not exist\n");
StartShutdown();
}
if ( ASSETCHAINS_CBOPRET != 0 )
komodo_pricesinit();
while (!fShutdown)