Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
198d905f91
  1. 5
      basilisk/basilisk_bitcoin.c
  2. 2
      iguana/iguana_unspents.c
  3. 2
      iguana/iguana_wallet.c
  4. 1
      iguana/tests/listtransactions

5
basilisk/basilisk_bitcoin.c

@ -905,7 +905,12 @@ cJSON *basilisk_history_item(struct iguana_info *coin,int64_t *totalp,char *coin
jaddnum(item,"numseconds",time(NULL) - timestamp); jaddnum(item,"numseconds",time(NULL) - timestamp);
details = cJSON_CreateObject(); details = cJSON_CreateObject();
if ( ismine > 0 ) if ( ismine > 0 )
{
jaddnum(details,"ismine",ismine); jaddnum(details,"ismine",ismine);
if ( strcmp(vinvoutstr,"spentheight") == 0 )
jaddstr(details,"category","sent");
else jaddstr(details,"category","received");
}
jaddbits256(details,"txid",txid); jaddbits256(details,"txid",txid);
jaddnum(details,vinvoutstr,vinvout); jaddnum(details,vinvoutstr,vinvout);
jaddnum(details,"height",height); jaddnum(details,"height",height);

2
iguana/iguana_unspents.c

@ -293,7 +293,7 @@ cJSON *iguana_RTunspentjson(struct supernet_info *myinfo,struct iguana_info *coi
} }
else else
{ {
if ( iguana_scriptget(coin,scriptstr,asmstr,sizeof(scriptstr),outpt.hdrsi,outpt.unspentind,txid,up->vout,rmd160,up->type,pubkey33) != 0 ) if ( iguana_scriptget(coin,scriptstr,asmstr,sizeof(scriptstr),outpt.hdrsi,outpt.unspentind,txid,vout,rmd160,up!=0?up->type:2,pubkey33) != 0 )
jaddstr(item,"scriptPubKey",scriptstr); jaddstr(item,"scriptPubKey",scriptstr);
} }
jaddnum(item,"amount",dstr(value)); jaddnum(item,"amount",dstr(value));

2
iguana/iguana_wallet.c

@ -1162,7 +1162,7 @@ TWOSTRINGS_AND_INT(bitcoinrpc,walletpassphrase,password,permanentfile,timeout)
retstr = SuperNET_login(IGUANA_CALLARGS,myinfo->handle,myinfo->secret,myinfo->permanentfile,myinfo->password); retstr = SuperNET_login(IGUANA_CALLARGS,myinfo->handle,myinfo->secret,myinfo->permanentfile,myinfo->password);
myinfo->expiration = (uint32_t)time(NULL) + timeout; myinfo->expiration = (uint32_t)time(NULL) + timeout;
iguana_walletinitcheck(myinfo,coin); iguana_walletinitcheck(myinfo,coin);
basilisk_unspents_update(myinfo,coin); //basilisk_unspents_update(myinfo,coin);
return(retstr); return(retstr);
} }

1
iguana/tests/listtransactions

@ -0,0 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"listtransactions\",\"params\":[1, 9999999, [\"RUXwXF37SMA63vL4bUPnytP3KUwp69PCVv\"]]}"
Loading…
Cancel
Save