Skip to content

Commit

Permalink
Merge branch 'spvdex' of https://github.com/jl777/SuperNET into dev-d…
Browse files Browse the repository at this point in the history
…ecker-spvdex
  • Loading branch information
DeckerSU committed Oct 16, 2017
2 parents 2a2cbcb + 3046871 commit 89f6719
Show file tree
Hide file tree
Showing 32 changed files with 981 additions and 481 deletions.
2 changes: 1 addition & 1 deletion crypto777/OS_portable.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <sys/types.h>
#include <time.h>

#ifdef WIN32
#ifdef _WIN32
#define sleep(x) Sleep(1000*(x))
#include "../OSlibs/win/mingw.h"
#include "../OSlibs/win/mman.h"
Expand Down
7 changes: 4 additions & 3 deletions crypto777/bitcoind_RPC.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,18 @@ char *post_process_bitcoind_RPC(char *debugstr,char *command,char *rpcstr,char *
long i,j,len;
char *retstr = 0;
cJSON *json,*result,*error;
usleep(2500);
//printf("<<<<<<<<<<< bitcoind_RPC: %s post_process_bitcoind_RPC.%s.[%s]\n",debugstr,command,rpcstr);
if ( command == 0 || rpcstr == 0 || rpcstr[0] == 0 )
{
if ( strcmp(command,"signrawtransaction") != 0 && strcmp(command,"getrawtransaction") != 0 )
printf("<<<<<<<<<<< bitcoind_RPC: %s post_process_bitcoind_RPC.%s.[%s]\n",debugstr,command,rpcstr);
printf("<<<<<<<<<<< A bitcoind_RPC: %s post_process_bitcoind_RPC.%s.[%s]\n",debugstr,command,params);
return(rpcstr);
}
json = cJSON_Parse(rpcstr);
if ( json == 0 )
{
printf("<<<<<<<<<<< bitcoind_RPC: %s post_process_bitcoind_RPC.%s can't parse.(%s) params.(%s)\n",debugstr,command,rpcstr,params);
printf("<<<<<<<<<<< B bitcoind_RPC: %s post_process_bitcoind_RPC.%s can't parse.(%s) params.(%s)\n",debugstr,command,rpcstr,params);
free(rpcstr);
return(0);
}
Expand Down Expand Up @@ -227,7 +228,7 @@ char *bitcoind_RPC(char **retstrp,char *debugstr,char *url,char *userpass,char *
{
count++;
elapsedsum += (OS_milliseconds() - starttime);
if ( (count % 10000) == 0)
if ( (count % 100000) == 0)
printf("%d: ave %9.6f | elapsed %.3f millis | bitcoind_RPC.(%s) url.(%s)\n",count,elapsedsum/count,(OS_milliseconds() - starttime),command,url);
if ( retstrp != 0 )
{
Expand Down
4 changes: 2 additions & 2 deletions crypto777/iguana_OS.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

char *OS_mvstr()
{
#ifdef __WIN32
#ifdef _WIN32
return("rename");
#else
return("mv");
Expand Down Expand Up @@ -659,7 +659,7 @@ int64_t OS_copyfile(char *src,char *dest,int32_t cmpflag)
{
if ( (destfp= fopen(OS_compatible_path(dest),"wb")) != 0 )
{
#ifdef WIN32
#ifdef _WIN32
allocsize = 1024 * 1024 * 8L;
#else
allocsize = 1024 * 1024 * 128L;
Expand Down
2 changes: 1 addition & 1 deletion crypto777/jpeg/unix/jmemname.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Also, the problem of determining the amount of memory available
* is shoved onto the user.
*/
#ifndef WIN32
#ifndef _WIN32
#include <unistd.h>
#endif

Expand Down
11 changes: 8 additions & 3 deletions iguana/exchanges/LP_coins.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void LP_statefname(char *fname,char *symbol,char *assetname,char *str,char *name
return;
}
sprintf(fname,"%s",LP_getdatadir());
#ifdef WIN32
#ifdef _WIN32
strcat(fname,"\\");
#else
strcat(fname,"/");
Expand Down Expand Up @@ -138,15 +138,15 @@ void LP_statefname(char *fname,char *symbol,char *assetname,char *str,char *name
#endif
if ( strcmp(symbol,"KMD") != 0 )
{
#ifdef WIN32
#ifdef _WIN32
strcat(fname,"\\");
#else
strcat(fname,"/");
#endif
strcat(fname,assetname);
}
}
#ifdef WIN32
#ifdef _WIN32
strcat(fname,"\\");
#else
strcat(fname,"/");
Expand Down Expand Up @@ -299,6 +299,11 @@ uint16_t LP_coininit(struct iguana_info *coin,char *symbol,char *name,char *asse
coin->inactive = (uint32_t)time(NULL);
coin->bussock = LP_coinbus(busport);
coin->ctx = bitcoin_ctx();
if ( assetname != 0 && strcmp(name,assetname) == 0 )
{
printf("%s is assetchain\n",symbol);
coin->isassetchain = 1;
}
if ( strcmp(symbol,"KMD") == 0 || (assetname != 0 && assetname[0] != 0) )
name2 = 0;
else name2 = name;
Expand Down
Loading

0 comments on commit 89f6719

Please sign in to comment.