From 17899df4ff88736a136f967cd00b3402e1de37c0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 21 Nov 2016 10:46:56 -0300 Subject: [PATCH] test --- src/komodo.h | 4 ++-- src/komodo_gateway.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 745e5f57e..8f2858095 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -462,7 +462,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) sleep(3); } } - KOMODO_INITDONE = (uint32_t)time(NULL); + //KOMODO_INITDONE = (uint32_t)time(NULL); if ( pindex != 0 ) { height = pindex->nHeight; @@ -547,7 +547,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) if ( pindex->nHeight == hwmheight ) komodo_stateupdate(height,0,0,0,zero,0,0,0,0,height,(uint32_t)pindex->nTime,0,0,0,0); } else printf("komodo_connectblock: unexpected null pindex\n"); - KOMODO_INITDONE = (uint32_t)time(NULL); + //KOMODO_INITDONE = (uint32_t)time(NULL); } diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index efe743323..a20b3868d 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -459,6 +459,11 @@ void komodo_passport_iteration() { static long lastpos[34]; static char userpass[33][1024]; FILE *fp; int32_t baseid,isrealtime,refid,blocks,longest; struct komodo_state *sp,*refsp; char *retstr,fname[512],*base,symbol[16],dest[16]; uint32_t buf[3]; cJSON *infoobj,*result; uint64_t RTmask = 0; + while ( KOMODO_INITDONE == 0 ) + { + fprintf(stderr,"PASSPORT iteration waiting for KOMODO_INITDONE\n"); + sleep(3); + } refsp = komodo_stateptr(symbol,dest); if ( ASSETCHAINS_SYMBOL[0] == 0 ) refid = 33;