From d4c346d6c065462837a81157ba87a5b9b8d4db9f Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 31 Oct 2016 14:46:29 -0300 Subject: [PATCH] test --- src/komodo_gateway.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index ab0f62dfe..f288c6877 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -337,7 +337,7 @@ int32_t komodo_gateway_tx(char *symbol,int32_t height,int32_t txi,char *txidstr, int32_t komodo_gateway_block(char *symbol,int32_t height,uint16_t port) { - char *retstr,*retstr2,params[128],*txidstr; int32_t i,n,retval = -1; cJSON *json,*tx,*result,*result2; + char *retstr,*retstr2,params[128],*txidstr; int32_t i,n,retval = -1; cJSON *json,*tx=0,*result=0,*result2; sprintf(params,"[%d]",height); if ( (retstr= komodo_issuemethod((char *)"getblockhash",params,port)) != 0 ) { @@ -359,16 +359,16 @@ int32_t komodo_gateway_block(char *symbol,int32_t height,uint16_t port) if ( i == n ) retval = 0; //else printf("error i.%d vs n.%d\n",i,n); - } + } else printf("cant get result.%p or tx.%p\n",result,tx); free_json(json); - } + } else printf("cant parse2.(%s)\n",retstr2); free(retstr2); - } + } else printf("error getblock %s\n",params); } else printf("strlen.%ld (%s)\n",strlen(txidstr),txidstr); free_json(result); - } + } else printf("couldnt parse.(%s)\n",retstr); free(retstr); - } + } else printf("error from getblockhash %d\n",height); return(retval); } @@ -385,7 +385,6 @@ void komodo_gateway_iteration(char *symbol) { for (i=0; i<1000 && KMDHEIGHT