From 2c7fe18ccc3da5a0203b04d895f270f4ef387767 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 12 Jan 2016 08:46:23 -0300 Subject: [PATCH] test --- iguana/iguana777.h | 4 +++- iguana/iguana_json.c | 7 ++++--- iguana/iguana_recv.c | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/iguana/iguana777.h b/iguana/iguana777.h index 9cae30eb8..65573e8f2 100755 --- a/iguana/iguana777.h +++ b/iguana/iguana777.h @@ -685,7 +685,9 @@ char *iguana_bitcoinRPC(struct supernet_info *myinfo,char *method,cJSON *json,ch cJSON *iguana_pubkeyjson(struct iguana_info *coin,char *pubkeystr); // API functions - +char *iguana_getinfo(struct supernet_info *myinfo,struct iguana_info *coin); +char *iguana_getbestblockhash(struct supernet_info *myinfo,struct iguana_info *coin); +char *iguana_getblockcount(struct supernet_info *myinfo,struct iguana_info *coin); char *iguana_listsinceblock(struct supernet_info *myinfo,struct iguana_info *coin,bits256 blockhash,int32_t target); char *iguana_getreceivedbyaccount(struct supernet_info *myinfo,struct iguana_info *coin,char *account,int32_t minconf); char *iguana_listreceivedbyaccount(struct supernet_info *myinfo,struct iguana_info *coin,char *account,int32_t includeempty); diff --git a/iguana/iguana_json.c b/iguana/iguana_json.c index 353f85294..a593ecf5d 100755 --- a/iguana/iguana_json.c +++ b/iguana/iguana_json.c @@ -469,6 +469,10 @@ cJSON *iguana_txjson(struct iguana_info *coin,struct iguana_txid *tx,int32_t hei } /* + //char *hashstr,*txidstr,*coinaddr,*txbytes,rmd160str[41],str[65]; int32_t len,height,i,n,valid = 0; + //cJSON *addrs,*retjson,*retitem; uint8_t rmd160[20],addrtype; bits256 hash2,checktxid; + //memset(&hash2,0,sizeof(hash2)); struct iguana_txid *tx,T; struct iguana_block *block = 0; + if ( (coinaddr= jstr(json,"address")) != 0 ) { if ( btc_addr2univ(&addrtype,rmd160,coinaddr) == 0 ) @@ -659,9 +663,6 @@ char *iguana_getblockcount(struct supernet_info *myinfo,struct iguana_info *coin char *ramchain_coinparser(struct supernet_info *myinfo,struct iguana_info *coin,char *method,cJSON *json) { - //char *hashstr,*txidstr,*coinaddr,*txbytes,rmd160str[41],str[65]; int32_t len,height,i,n,valid = 0; - //cJSON *addrs,*retjson,*retitem; uint8_t rmd160[20],addrtype; bits256 hash2,checktxid; - //memset(&hash2,0,sizeof(hash2)); struct iguana_txid *tx,T; struct iguana_block *block = 0; if ( coin == 0 && (coin= iguana_coinselect()) == 0 ) return(clonestr("{\"error\":\"ramchain_coinparser needs coin\"}")); if ( strcmp(method,"status") == 0 || strcmp(method,"getinfo") == 0 ) diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index d83d3b46a..17940f616 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -673,7 +673,7 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr) // printf("%s %d overlimit.%d\n",addr->ipaddr,addr->pendblocks,limit); if ( coin->bundlescount > 0 && (req= queue_dequeue(&coin->priorityQ,0)) == 0 && addr->pendblocks < limit )//&& now > addr->lastpoll ) { - if ( 1 )//strcmp("BTC",coin->symbol) != 0 ) + if ( 0 )//strcmp("BTC",coin->symbol) != 0 ) { int32_t bundlei; incr = coin->peers.numranked == 0 ? coin->MAXPEERS : coin->peers.numranked;