Browse Source

Test

etomic
jl777 8 years ago
parent
commit
86f56ab986
  1. 4
      basilisk/basilisk_DEX.c
  2. 10
      basilisk/basilisk_swap.c
  3. 2
      basilisk/jumblr.c
  4. 2
      iguana/unparsed.txt

4
basilisk/basilisk_DEX.c

@ -315,7 +315,7 @@ void basilisk_requests_poll(struct supernet_info *myinfo,bits256 privkey)
dex_channelsend(myinfo,issueR.srchash,issueR.desthash,channel,0x4000000,(void *)&issueR.requestid,sizeof(issueR.requestid)); // 60 dex_channelsend(myinfo,issueR.srchash,issueR.desthash,channel,0x4000000,(void *)&issueR.requestid,sizeof(issueR.requestid)); // 60
dpow_nanomsg_update(myinfo); dpow_nanomsg_update(myinfo);
dex_updateclient(myinfo); dex_updateclient(myinfo);
if ( (retstr= basilisk_start(myinfo,myinfo->persistent_priv,&issueR,1,issueR.optionhours * 3600)) != 0 ) if ( (retstr= basilisk_start(myinfo,myinfo->jumblr_depositkey,&issueR,1,issueR.optionhours * 3600)) != 0 )
free(retstr); free(retstr);
} }
else if ( bits256_cmp(myinfo->jumblr_pubkey,issueR.srchash) == 0 ) else if ( bits256_cmp(myinfo->jumblr_pubkey,issueR.srchash) == 0 )
@ -758,7 +758,7 @@ INT_ARG(InstantDEX,incoming,requestid)
msgid = (uint32_t)time(NULL) + drift; msgid = (uint32_t)time(NULL) + drift;
if ( (retarray= basilisk_channelget(myinfo,zero,myinfo->myaddr.persistent,DEX_channel,msgid,width)) != 0 ) if ( (retarray= basilisk_channelget(myinfo,zero,myinfo->myaddr.persistent,DEX_channel,msgid,width)) != 0 )
{ {
printf("GOT.(%s)\n",jprint(retarray,0)); //printf("GOT.(%s)\n",jprint(retarray,0));
if ( (retval= basilisk_process_retarray(myinfo,0,InstantDEX_process_channelget,data,sizeof(data),DEX_channel,msgid,retarray,InstantDEX_incoming_func)) > 0 ) if ( (retval= basilisk_process_retarray(myinfo,0,InstantDEX_process_channelget,data,sizeof(data),DEX_channel,msgid,retarray,InstantDEX_incoming_func)) > 0 )
{ {
jaddstr(retjson,"result","success"); jaddstr(retjson,"result","success");

10
basilisk/basilisk_swap.c

@ -1383,10 +1383,13 @@ void basilisk_swap_purge(struct supernet_info *myinfo,struct basilisk_swap *swap
int32_t basilisk_verify_otherstatebits(struct supernet_info *myinfo,void *ptr,uint8_t *data,int32_t datalen) int32_t basilisk_verify_otherstatebits(struct supernet_info *myinfo,void *ptr,uint8_t *data,int32_t datalen)
{ {
struct basilisk_swap *swap = ptr; int32_t retval; struct basilisk_swap *swap = ptr;
if ( datalen == sizeof(swap->I.otherstatebits) ) if ( datalen == sizeof(swap->I.otherstatebits) )
return(iguana_rwnum(0,data,sizeof(swap->I.otherstatebits),&swap->I.otherstatebits)); {
else return(-1); retval = iguana_rwnum(0,data,sizeof(swap->I.otherstatebits),&swap->I.otherstatebits);
printf("got sendstate.%x\n",swap->I.otherstatebits);
return(retval);
} else return(-1);
} }
int32_t basilisk_verify_choosei(struct supernet_info *myinfo,void *ptr,uint8_t *data,int32_t datalen) int32_t basilisk_verify_choosei(struct supernet_info *myinfo,void *ptr,uint8_t *data,int32_t datalen)
@ -1540,6 +1543,7 @@ int32_t basilisk_checkdeck(struct supernet_info *myinfo,struct basilisk_swap *sw
void basilisk_sendstate(struct supernet_info *myinfo,struct basilisk_swap *swap,uint8_t *data,int32_t maxlen) void basilisk_sendstate(struct supernet_info *myinfo,struct basilisk_swap *swap,uint8_t *data,int32_t maxlen)
{ {
int32_t datalen; int32_t datalen;
printf("sendstate.%x\n",swap->I.statebits);
datalen = iguana_rwnum(1,data,sizeof(swap->I.statebits),&swap->I.statebits); datalen = iguana_rwnum(1,data,sizeof(swap->I.statebits),&swap->I.statebits);
basilisk_swapsend(myinfo,swap,0x80000000,data,datalen,0,0); basilisk_swapsend(myinfo,swap,0x80000000,data,datalen,0,0);
} }

2
basilisk/jumblr.c

@ -564,7 +564,7 @@ ZERO_ARGS(jumblr,status)
jaddnum(retjson,"received",dstr(received)); jaddnum(retjson,"received",dstr(received));
jaddnum(retjson,"finished",dstr(finished)); jaddnum(retjson,"finished",dstr(finished));
return(jprint(retjson,1)); return(jprint(retjson,1));
} else return(clonestr("{\"error\":\"no passphrase or no native komodod\"}")); } else return(clonestr("{\"error\":\"jumblr status no passphrase or no native komodod\"}"));
} }
#include "../includes/iguana_apiundefs.h" #include "../includes/iguana_apiundefs.h"

2
iguana/unparsed.txt

@ -1 +1 @@
6304a16dbc58b1752102baf994f2e1e765f474a3fd8c46f6b13c518e8855858ab46c69008c91ee84cda2ac67a914eed7fe456f91215de2205098928052bd8dbda9c6882103baf994f2e1e765f474a3fd8c46f6b13c518e8855858ab46c69008c91ee84cda2ac68 6304ed6fbc58b1752102b12fb1636597dbb81f5da6b05fa8e7d1d2613ada75c57fe6de2816e7ec3b23b5ac67a914f2d2987381a415363dc6a07c2d6440eefff54279882103fef6acf0aa9a0306647a928cc20784fe8349d020d811d2c098b370aa7bc3ba64ac68

Loading…
Cancel
Save