Browse Source

Test

etomic
jl777 8 years ago
parent
commit
cacf188f63
  1. 4
      basilisk/jumblr.c
  2. 2
      iguana/dpow/dpow_network.c

4
basilisk/jumblr.c

@ -173,6 +173,8 @@ char *jumblr_zgetbalance(struct supernet_info *myinfo,struct iguana_info *coin,c
char *jumblr_listunspent(struct supernet_info *myinfo,struct iguana_info *coin,char *addr) char *jumblr_listunspent(struct supernet_info *myinfo,struct iguana_info *coin,char *addr)
{ {
char params[1024]; char params[1024];
if ( coin->FULLNODE == 0 )
return(_dex_listunspent(myinfo,coin->symbol,addr));
sprintf(params,"[1, 99999999, [\"%s\"]]",addr); sprintf(params,"[1, 99999999, [\"%s\"]]",addr);
return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"listunspent",params)); return(bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"listunspent",params));
} }
@ -568,7 +570,7 @@ void jumblr_utxotxidpendingadd(struct supernet_info *myinfo,struct iguana_info *
void jumblr_utxoupdate(struct supernet_info *myinfo,struct iguana_info *coin,double price,char *coinaddr) void jumblr_utxoupdate(struct supernet_info *myinfo,struct iguana_info *coin,double price,char *coinaddr)
{ {
char *retstr; cJSON *array,*item; int32_t i,n,vout; bits256 txid,splittxid; uint64_t value; char *retstr; cJSON *array,*item; int32_t i,n,vout; bits256 txid,splittxid; uint64_t value;
if ( (retstr= _dex_listunspent(myinfo,coin->symbol,coinaddr)) != 0 ) if ( (retstr= jumblr_listunspent(myinfo,coin,coinaddr)) != 0 )
{ {
printf("%s.(%s)\n",coin->symbol,retstr); printf("%s.(%s)\n",coin->symbol,retstr);
if ( (array= cJSON_Parse(retstr)) != 0 ) if ( (array= cJSON_Parse(retstr)) != 0 )

2
iguana/dpow/dpow_network.c

@ -1154,7 +1154,7 @@ char *_dex_listunspentarg(struct supernet_info *myinfo,char *symbol,char *addres
dexreq.func = arg; dexreq.func = arg;
if ( (retstr= _dex_sendrequeststr(myinfo,&dexreq,address,0,1,"")) != 0 ) if ( (retstr= _dex_sendrequeststr(myinfo,&dexreq,address,0,1,"")) != 0 )
{ {
printf("UNSPENTS.(%s)\n",retstr); printf("%s UNSPENTS.(%s)\n",symbol,retstr);
} }
return(_dex_arrayreturn(retstr)); return(_dex_arrayreturn(retstr));
} }

Loading…
Cancel
Save