Browse Source

test

acspeed
jl777 8 years ago
parent
commit
9d2ad0c524
  1. 2
      iguana/iguana_payments.c
  2. 5
      iguana/iguana_wallet.c
  3. 2
      iguana/tests/listtransactions
  4. 2
      iguana/tests/listunspent
  5. 2
      iguana/tests/listunspent2

2
iguana/iguana_payments.c

@ -1238,7 +1238,7 @@ cJSON *iguana_listunspents(struct supernet_info *myinfo,struct iguana_info *coin
{
array = iguana_getaddressesbyaccount(myinfo,coin,"*");
flag = 1;
//printf("listunspent.(%s)\n",jprint(array,0));
printf("listunspent.(%s)\n",jprint(array,0));
}
if ( minconf == 0 )
minconf = 1;

5
iguana/iguana_wallet.c

@ -1731,7 +1731,7 @@ STRING_AND_THREEINTS(bitcoinrpc,listtransactions,account,count,skip,includewatch
return(clonestr("{\"error\":\"need to unlock wallet\"}"));
retjson = cJSON_CreateObject();
retarray = cJSON_CreateArray();
if ( (wacct= iguana_waccountfind(myinfo,account)) != 0 )
if ( account == 0 || account[0] == 0 || (wacct= iguana_waccountfind(myinfo,account)) != 0 )
{
if ( (array= iguana_getaddressesbyaccount(myinfo,coin,account)) != 0 )
{
@ -1768,7 +1768,8 @@ STRING_AND_THREEINTS(bitcoinrpc,listtransactions,account,count,skip,includewatch
"blocktime": 1448045745,
}*/
item = cJSON_CreateObject();
jaddstr(item,"account",wacct->account);
if ( wacct != 0 )
jaddstr(item,"account",wacct->account);
iguana_txdetails(myinfo,coin,item,txid,vout,iguana_txidheight(myinfo,coin,txid));
jaddi(retarray,item);
}

2
iguana/tests/listtransactions

@ -1,2 +1,2 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"listtransactions\",\"params\":[1, 9999999, [\"RUXwXF37SMA63vL4bUPnytP3KUwp69PCVv\"]]}"
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"listtransactions\",\"params\":[1, 9999999, [\"RDBjpRUqV1AXzVJCBbbXNskgxGRj711qSc\"]]}"

2
iguana/tests/listunspent

@ -1,2 +1,2 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTC\",\"method\":\"listunspent\",\"params\":[1, 9999999, []]}"
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"listunspent\",\"params\":[1, 9999999, []]}"

2
iguana/tests/listunspent2

@ -1,2 +1,2 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"listunspent\",\"params\":[1, 9999999, []]}"
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"listunspent\",\"params\":[1, 9999999, [\"RNJmgYaFF5DbnrNUX6pMYz9rcnDKC2tuAc\"]]}"

Loading…
Cancel
Save