From c99e16c6dba0e35841d0c46969c2977031d14cfa Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 30 Nov 2017 13:22:18 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_rpc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index bf524f57e..3d2c7ee79 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -240,7 +240,7 @@ void NXTventure_liquidation() { "6932037131189568014", "1495473", "jl777hodl", "1" }, { "15344649963748848799", "7250", "InstantDEX", "1" }, }; - char *retstr,url[1024],*account; uint64_t qty,qtyA,assetid,sum; double ratio; cJSON *array,*item,*retjson; int32_t i,j,decimals,numassetids=(int32_t)(sizeof(assetids)/sizeof(*assetids)),n=0; + char *retstr,*retstr2,url[1024],*account; uint64_t qty,qtyA,assetid,sum; double ratio; cJSON *array,*item,*retjson; int32_t i,j,decimals,numassetids=(int32_t)(sizeof(assetids)/sizeof(*assetids)),n=0; char *passphrase = ""; sprintf(url,"http://127.0.0.1:7876/nxt?requestType=getAssetAccounts&asset=16212446818542881180"); // {"quantityQNT":"380910","accountRS":"NXT-74VC-NKPE-RYCA-5LMPT","unconfirmedQuantityQNT":"380910","asset":"16212446818542881180","account":"4383817337783094122"} @@ -269,6 +269,12 @@ void NXTventure_liquidation() printf("%s %.6f %8llu QNT %s -> %llu %.8f\n",account,ratio,(long long)qtyA,assetids[j][2],(long long)(qtyA * ratio),((double)(long long)(qtyA * ratio))/decimals); sum += (long long)(qtyA * ratio); sprintf(url,"http://127.0.0.1:7876/nxt?requestType=transferAsset&secretPhrase=%s&recipient=%s&asset=%llu&quantityQNT=%llu&feeNQT=100000000",passphrase,account,(long long)assetid,(long long)(qtyA * ratio)); + if ( (retstr2= issue_curlt(url,LP_HTTP_TIMEOUT)) != 0 ) + { + printf("%s\n",retstr2); + free(retstr2); + } + usleep(250000); } } }