From 723b1f454d711f2c9f2675df9597aac86dcf1422 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 7 Mar 2017 21:14:28 +0200 Subject: [PATCH] Test --- basilisk/basilisk_DEX.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/basilisk/basilisk_DEX.c b/basilisk/basilisk_DEX.c index 973f7fc2a..30f9bed74 100755 --- a/basilisk/basilisk_DEX.c +++ b/basilisk/basilisk_DEX.c @@ -231,14 +231,14 @@ int32_t basilisk_request_create(struct basilisk_request *rp,cJSON *valsobj,bits2 char *basilisk_start(struct supernet_info *myinfo,bits256 privkey,struct basilisk_request *_rp,uint32_t statebits,int32_t optionduration) { - cJSON *retjson; struct basilisk_request *rp=0; int32_t i,srcmatch,destmatch; + cJSON *retjson; bits256 tmpprivkey; struct basilisk_request *rp=0; int32_t i,srcmatch,destmatch; if ( _rp->requestid == myinfo->lastdexrequestid ) { //printf("filter duplicate r%u\n",_rp->requestid); return(clonestr("{\"error\":\"filter duplicate requestid\"}")); } - srcmatch = smartaddress_pubkey(myinfo,&privkey,_rp->srchash) >= 0; - destmatch = smartaddress_pubkey(myinfo,&privkey,_rp->desthash) >= 0; + srcmatch = smartaddress_pubkey(myinfo,&tmpprivkey,_rp->srchash) >= 0; + destmatch = smartaddress_pubkey(myinfo,&tmpprivkey,_rp->desthash) >= 0; if ( srcmatch != 0 || destmatch != 0 ) { for (i=0; inumswaps; i++) @@ -257,8 +257,7 @@ char *basilisk_start(struct supernet_info *myinfo,bits256 privkey,struct basilis { basilisk_request_enqueue(myinfo,rp); return(clonestr("{\"result\":\"started atomic swap thread\"}")); - } - else return(clonestr("{\"error\":\"couldnt atomic swap thread\"}")); + } else return(clonestr("{\"error\":\"couldnt atomic swap thread\"}")); } else {