Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
e199271137
  1. 2
      iguana/iguana_rpc.c
  2. 2
      iguana/iguana_wallet.c
  3. 2
      iguana/tests/importprivkey

2
iguana/iguana_rpc.c

@ -368,7 +368,7 @@ static char *dumpprivkey(RPCARGS)
static char *importprivkey(RPCARGS) static char *importprivkey(RPCARGS)
{ {
return(sglue1(0,CALLGLUE,"bitcoinrpc","importprivkey","wif",params[0])); return(sglue3(0,CALLGLUE,"bitcoinrpc","importprivkey","wif",params[0],"account",params[1],"rescan",params[2]));
} }
static char *dumpwallet(RPCARGS) static char *dumpwallet(RPCARGS)

2
iguana/iguana_wallet.c

@ -1157,8 +1157,8 @@ TWOSTRINGS_AND_INT(bitcoinrpc,importprivkey,wif,account,rescan)
if ( waddr == 0 ) if ( waddr == 0 )
waddr = &addr; waddr = &addr;
iguana_waddresscalc(myinfo,coin->chain->pubtype,coin->chain->wiftype,waddr,privkey); iguana_waddresscalc(myinfo,coin->chain->pubtype,coin->chain->wiftype,waddr,privkey);
retjson = iguana_walletadd(myinfo,0,coin,retstr,account,waddr,0,0);
iguana_waccountswitch(myinfo,coin,account,waddr->coinaddr,0); iguana_waccountswitch(myinfo,coin,account,waddr->coinaddr,0);
retjson = iguana_walletadd(myinfo,0,coin,retstr,account,waddr,0,0);
if ( retstr != 0 ) if ( retstr != 0 )
scrubfree(retstr); scrubfree(retstr);
return(jprint(retjson,1)); return(jprint(retjson,1));

2
iguana/tests/importprivkey

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"method\":\"importprivkey\",\"params\":[\"UvBSu7PtUcGFeCd4fJdWSN6NKH4DPzmMoZtPn4Sb94Tj3CyXj9Fn\"]}" curl --url "http://127.0.0.1:7778" --data "{\"method\":\"importprivkey\",\"params\":[\"UvBSu7PtUcGFeCd4fJdWSN6NKH4DPzmMoZtPn4Sb94Tj3CyXj9Fn\", \"testing\"]}"

Loading…
Cancel
Save