diff --git a/basilisk/basilisk_DEX.c b/basilisk/basilisk_DEX.c index 6e6432a3b..5118711dd 100755 --- a/basilisk/basilisk_DEX.c +++ b/basilisk/basilisk_DEX.c @@ -231,14 +231,15 @@ 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,reqmatch; + cJSON *retjson; 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\"}")); } - reqmatch = (bits256_cmp(_rp->srchash,myinfo->myaddr.persistent) == 0 || bits256_cmp(_rp->srchash,myinfo->jumblr_pubkey) == 0 || bits256_cmp(_rp->srchash,myinfo->jumblr_depositkey) == 0); - if ( (reqmatch != 0 || bits256_cmp(_rp->desthash,myinfo->myaddr.persistent) == 0) ) + srcmatch = (bits256_cmp(_rp->srchash,myinfo->myaddr.persistent) == 0 || bits256_cmp(_rp->srchash,myinfo->jumblr_pubkey) == 0 || bits256_cmp(_rp->srchash,myinfo->jumblr_depositkey) == 0); + destmatch = (bits256_cmp(_rp->desthash,myinfo->myaddr.persistent) == 0 || bits256_cmp(_rp->desthash,myinfo->jumblr_pubkey) == 0 || bits256_cmp(_rp->desthash,myinfo->jumblr_depositkey) == 0); + if ( srcmatch != 0 || destmatch != 0 ) { for (i=0; inumswaps; i++) if ( myinfo->swaps[i]->I.req.requestid == _rp->requestid ) diff --git a/basilisk/jumblr.c b/basilisk/jumblr.c index a39e7b0a5..4dabd3399 100755 --- a/basilisk/jumblr.c +++ b/basilisk/jumblr.c @@ -383,12 +383,13 @@ void jumblr_DEXcheck(struct supernet_info *myinfo,struct iguana_info *coinkmd,ch printf("BTC deposits %.8f, min %.8f\n",btcavail,minbtc); vals = cJSON_CreateObject(); jaddstr(vals,"source","BTC"); - jaddbits256(vals,"srchash",curve25519(privkey,curve25519_basepoint9())); + hash = curve25519(privkey,curve25519_basepoint9()); + jaddbits256(vals,"srchash",hash); jaddstr(vals,"dest","KMD"); jaddnum(vals,"amount",btcavail*.3); jaddnum(vals,"minprice",kmdprice*.95); - //jaddnum(vals,"usejumblr",1); - memset(hash.bytes,0,sizeof(hash)); + jaddnum(vals,"usejumblr",1); + //memset(hash.bytes,0,sizeof(hash)); pending = btcavail; if ( (retstr= InstantDEX_request(myinfo,coinbtc,0,0,hash,vals,"")) != 0 ) {