From d7161e658660c522145aa9b6f94acf521b936544 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 21 Nov 2016 07:13:15 -0300 Subject: [PATCH] Revert "test" This reverts commit 131207a1f48d4ae93b45a552f286bc0297d009e1. --- src/komodo.h | 10 ++++++++-- src/komodo_gateway.h | 8 -------- src/komodo_utils.h | 30 ------------------------------ 3 files changed, 8 insertions(+), 40 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 59fbe0442..ed05c1a46 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -168,7 +168,7 @@ int32_t komodo_parsestatefile(struct komodo_state *sp,FILE *fp,char *symbol,char return(func); } else return(-1); } - + void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotaries,uint8_t notaryid,uint256 txhash,uint64_t voutmask,uint8_t numvouts,uint32_t *pvals,uint8_t numpvals,int32_t KMDheight,uint64_t opretvalue,uint8_t *opretbuf,uint16_t opretlen,uint16_t vout) { static FILE *fp; static int32_t errs; @@ -177,7 +177,13 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar return; if ( fp == 0 ) { - komodo_statename(fname,ASSETCHAINS_SYMBOL); +#ifdef WIN32 + sprintf(fname,"%s\\%s",GetDataDir(false).string().c_str(),(char *)"komodostate"); + //sprintf(fname2,"%s\\%s",GetDataDir(false).string().c_str(),(char *)"minerids"); +#else + sprintf(fname,"%s/%s",GetDataDir(false).string().c_str(),(char *)"komodostate"); + //sprintf(fname2,"%s/%s",GetDataDir(false).string().c_str(),(char *)"minerids"); +#endif /*memset(Minerids,0xfe,sizeof(Minerids)); if ( (Minerfp= fopen(fname2,"rb+")) == 0 ) { diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index afb032448..d72c4b1c0 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -385,7 +385,6 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 return(typestr); } -#ifdef pollmethod void komodo_gateway_voutupdate(char *symbol,int32_t isspecial,int32_t height,int32_t txi,bits256 txid,int32_t vout,int32_t numvouts,uint64_t value,uint8_t *script,int32_t len) { int32_t i,opretlen,offset = 0; uint256 zero,utxid; const char *typestr; @@ -532,13 +531,6 @@ void komodo_gateway_iteration(char *symbol) sleep(30); } } -#else - -void komodo_gateway_iteration(char *symbol) -{ - -} -#endif void komodo_iteration(char *symbol) { diff --git a/src/komodo_utils.h b/src/komodo_utils.h index d18dca12d..78d38141d 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1261,36 +1261,6 @@ void komodo_userpass(char *username,char *password,FILE *fp) free(rpcpassword); } -void komodo_statename(char *fname,char *symbol) -{ - int32_t n,len; - sprintf(fname,"%s",GetDataDir(false).string().c_str()); - if ( (n= (int32_t)strlen(ASSETCHAINS_SYMBOL)) != 0 ) - { - len = (int32_t)strlen(fname); - if ( strcmp(ASSETCHAINS_SYMBOL,&fname[len - n]) == 0 ) - { - fname[len - n] = 0; - if ( symbol[0] != 0 ) - { - strcpy(&fname[len - n],symbol); -#ifdef WIN32 - strcat(fname,"\\"); -#else - strcat(fname,"//"); -#endif - } - } - else - { - printf("unexpected fname.(%s) vs %s\n",fname,ASSETCHAINS_SYMBOL); - return; - } - } - strcat(fname,(char *)"komodostate"); - printf("statename.(%s) %s\n",symbol,fname); -} - void komodo_configfile(char *symbol,uint16_t port) { static char myusername[512],mypassword[8192];