|
|
@ -752,33 +752,6 @@ void dragon_urlinit(struct supernet_info *myinfo,int32_t ismainnet,int32_t usess |
|
|
|
else strcat(myinfo->NXTAPIURL,"6876/nxt"); |
|
|
|
} |
|
|
|
|
|
|
|
void jumblr_loop(void *ptr) |
|
|
|
{ |
|
|
|
struct dragon_info *coin; uint32_t t,n=0; struct supernet_info *myinfo = ptr; int32_t mult = 10; |
|
|
|
printf("JUMBLR loop\n"); |
|
|
|
while ( myinfo->IAMNOTARY == 0 ) |
|
|
|
{ |
|
|
|
if ( (coin= dragon_coinfind("KMD")) != 0 ) |
|
|
|
{ |
|
|
|
n++; |
|
|
|
if ( (n % 3) == 0 ) |
|
|
|
smartaddress_update(myinfo,(n/3) & 1); |
|
|
|
if ( myinfo->jumblr_passphrase[0] != 0 && coin->FULLNODE < 0 ) |
|
|
|
{ |
|
|
|
// if BTC has arrived in destination address, invoke DEX -> BTC
|
|
|
|
t = (uint32_t)time(NULL); |
|
|
|
if ( (t % (120 * mult)) < 60 ) |
|
|
|
{ |
|
|
|
// if BTC has arrived in deposit address, invoke DEX -> KMD
|
|
|
|
jumblr_iteration(myinfo,coin,(t % (360 * mult)) / (120 * mult),t % (120 * mult)); |
|
|
|
} |
|
|
|
//printf("t.%u %p.%d %s\n",t,coin,coin!=0?coin->FULLNODE:0,myinfo->jumblr_passphrase);
|
|
|
|
} |
|
|
|
} |
|
|
|
sleep(55); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void dpow_loop(void *arg) |
|
|
|
{ |
|
|
|
RenameThread("dpow_loop"); |
|
|
@ -1864,15 +1837,6 @@ ZERO_ARGS(SuperNET,activehandle) |
|
|
|
jaddstr(retjson,"status","unlocked"); |
|
|
|
jaddnum(retjson,"duration",myinfo->expiration - time(NULL)); |
|
|
|
} else jaddstr(retjson,"status","locked"); |
|
|
|
if ( myinfo->jumblr_passphrase[0] != 0 ) |
|
|
|
{ |
|
|
|
jumblr_privkey(myinfo,BTCaddr,0,KMDaddr,JUMBLR_DEPOSITPREFIX); |
|
|
|
jaddstr(retjson,"BTCdeposit","notyet"); |
|
|
|
jaddstr(retjson,"KMDdeposit",KMDaddr); |
|
|
|
jumblr_privkey(myinfo,BTCaddr,0,KMDaddr,""); |
|
|
|
jaddstr(retjson,"BTCjumblr","notyet"); |
|
|
|
jaddstr(retjson,"KMDjumblr",KMDaddr); |
|
|
|
} |
|
|
|
SuperNET_MYINFOadd(myinfo); |
|
|
|
return(jprint(retjson,1)); |
|
|
|
} |
|
|
|