This commit is contained in:
jl777
2016-11-21 11:10:35 -03:00
parent 71da283a42
commit f42f928860
4 changed files with 6 additions and 4 deletions

View File

@@ -192,10 +192,8 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar
komodo_statefname(fname,ASSETCHAINS_SYMBOL,(char *)"komodostate");
if ( (fp= fopen(fname,"rb+")) != 0 )
{
pthread_mutex_lock(&komodo_mutex);
while ( komodo_parsestatefile(sp,fp,symbol,dest) >= 0 )
;
pthread_mutex_unlock(&komodo_mutex);
} else fp = fopen(fname,"wb+");
printf("fname.(%s) fpos.%ld\n",fname,ftell(fp));
KOMODO_INITDONE = (uint32_t)time(NULL);
@@ -208,7 +206,6 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar
if ( fp != 0 ) // write out funcid, height, other fields, call side effect function
{
//printf("fpos.%ld ",ftell(fp));
pthread_mutex_lock(&komodo_mutex);
if ( KMDheight != 0 )
{
if ( KMDtimestamp != 0 )
@@ -313,7 +310,6 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar
//komodo_notarized_update(height,NOTARIZED_HEIGHT,NOTARIZED_HASH,NOTARIZED_DESTTXID);
}
fflush(fp);
pthread_mutex_unlock(&komodo_mutex);
}
}