From 4767f1fcd5cb2d91603e070ba93a20c312b01578 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 21 Nov 2016 10:22:29 -0300 Subject: [PATCH] test --- src/komodo.h | 11 ++++------- src/komodo_gateway.h | 1 + src/komodo_globals.h | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 88f801cc1..8c1445bc6 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -454,14 +454,11 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) komodo_stateupdate(pindex->nHeight,0,0,0,zero,0,0,0,0,-pindex->nHeight,pindex->nTime,0,0,0,0); } komodo_currentheight_set(chainActive.Tip()->nHeight); - /*if ( komodo_is_issuer() != 0 ) + while ( KOMODO_PASSPORT_INITDONE == 0 ) { - while ( KOMODO_REALTIME == 0 || time(NULL) <= KOMODO_REALTIME ) - { - fprintf(stderr,"komodo_connect.(%s) waiting for realtime RT.%u now.%u\n",ASSETCHAINS_SYMBOL,KOMODO_REALTIME,(uint32_t)time(NULL)); - sleep(30); - } - }*/ + fprintf(stderr,"komodo_connect.(%s) waiting for KOMODO_PASSPORT_INITDONE.%u\n",ASSETCHAINS_SYMBOL,KOMODO_PASSPORT_INITDONE); + sleep(3); + } KOMODO_INITDONE = (uint32_t)time(NULL); if ( pindex != 0 ) { diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 7c44512f9..efe743323 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -528,5 +528,6 @@ void komodo_passport_iteration() refsp->RTbufs[0][2] = 0; } refsp->RTmask = RTmask; + KOMODO_PASSPORT_INITDONE = 1; } diff --git a/src/komodo_globals.h b/src/komodo_globals.h index a4ab49acf..a17c29964 100644 --- a/src/komodo_globals.h +++ b/src/komodo_globals.h @@ -36,7 +36,7 @@ struct komodo_state KOMODO_STATES[34]; int COINBASE_MATURITY = 100; -int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAINS_SEED,KOMODO_ON_DEMAND,KOMODO_EXTERNAL_NOTARIES; +int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAINS_SEED,KOMODO_ON_DEMAND,KOMODO_EXTERNAL_NOTARIES,KOMODO_PASSPORT_INITDONE; std::string NOTARY_PUBKEY,ASSETCHAINS_NOTARIES; uint8_t NOTARY_PUBKEY33[33];