Browse Source

tesst

release/v0.1
jl777 9 years ago
parent
commit
9c53eb46a0
  1. 4
      iguana/iguana_json.c
  2. 1
      iguana/tests/arraytest

4
iguana/iguana_json.c

@ -603,7 +603,7 @@ STRING_ARG(iguana,getconnectioncount,activecoin)
ZERO_ARGS(bitcoinrpc,getdifficulty)
{
char buf[64];
char buf[512];
if ( coin != 0 )
{
/* {
@ -611,7 +611,7 @@ ZERO_ARGS(bitcoinrpc,getdifficulty)
"proof-of-stake": 0.00112314,
"search-interval": 0
}*/
sprintf(buf,"{\"result\":\"%.8f\"}",PoW_from_compact(coin->blocks.hwmchain.RO.bits,coin->chain->unitval));
sprintf(buf,"{\"result\":\"success\",\"proof-of-work\":\"%.8f\",\"search-interval\": 0}",PoW_from_compact(coin->blocks.hwmchain.RO.bits,coin->chain->unitval));
return(clonestr(buf));
} else return(clonestr("{\"error\":\"getdifficulty needs coin\"}"));
}

1
iguana/tests/arraytest

@ -0,0 +1 @@
curl --url "http://127.0.0.1:7778" --data "[{\"agent\":\"SuperNET\",\"method\":\"activehandle\"}, {\"agent\":\"bitcoinrpc\",\"activecoin\":\"BTCD\",\"method\":\"getdifficulty\"}]"
Loading…
Cancel
Save