Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
2c7fe18ccc
  1. 4
      iguana/iguana777.h
  2. 7
      iguana/iguana_json.c
  3. 2
      iguana/iguana_recv.c

4
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);

7
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 )

2
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;

Loading…
Cancel
Save