Browse Source

Test

etomic
jl777 8 years ago
parent
commit
0e9dbe154d
  1. 4
      iguana/exchanges/LP_scan.c
  2. 10
      iguana/exchanges/snapshot_balance
  3. 0
      iguana/exchanges/snapshot_loop

4
iguana/exchanges/LP_scan.c

@ -362,6 +362,8 @@ cJSON *LP_snapshot(struct iguana_info *coin,int32_t height)
}
}
jadd(retjson,"balances",array);
jaddstr(retjson,"coin",coin->symbol);
jaddnum(retjson,"height",height);
jaddnum(retjson,"numaddresses",n);
jaddnum(retjson,"total",dstr(balance));
jaddnum(retjson,"noaddr_total",dstr(noaddr_balance));
@ -410,6 +412,8 @@ char *LP_snapshot_balance(struct iguana_info *coin,int32_t height,cJSON *argjson
free_json(snapjson);
}
jadd(retjson,"balances",array);
jaddstr(retjson,"coin",coin->symbol);
jaddnum(retjson,"height",height);
jaddnum(retjson,"balance",dstr(balance));
return(jprint(retjson,1));
}

10
iguana/exchanges/snapshot_balance

@ -0,0 +1,10 @@
source userpass
ht=$1
while true
do
curl --url "http://127.0.0.1:7779" --data "{\"userpass\":\"$userpass\",\"method\":\"snapshot_balance\",\"coin\":\"KMD\",\"height\":$ht,\"addresses\":[\"RSAzPFzgTZHNcxLNLdGyVPbjbMA8PRY7Ss\", \"RBgD5eMGwZppid4x7PTEC2Wg1AzvxbsQqB\"]}"
ht=$(( $ht + 100 ))
echo next hight $ht
sleep 6000
done

0
iguana/exchanges/snaploop → iguana/exchanges/snapshot_loop

Loading…
Cancel
Save