diff --git a/iguana/exchanges/LP_scan.c b/iguana/exchanges/LP_scan.c index fc635460a..3b54395c7 100644 --- a/iguana/exchanges/LP_scan.c +++ b/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)); } diff --git a/iguana/exchanges/snapshot_balance b/iguana/exchanges/snapshot_balance new file mode 100644 index 000000000..d34b8ecd6 --- /dev/null +++ b/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 + diff --git a/iguana/exchanges/snaploop b/iguana/exchanges/snapshot_loop similarity index 100% rename from iguana/exchanges/snaploop rename to iguana/exchanges/snapshot_loop