Browse Source

bypass jumble for notaries

etomic
jl777 8 years ago
parent
commit
69fd47873d
  1. 6
      basilisk/jumblr.c
  2. 2
      iguana/dpow/dpow_network.c
  3. 4
      iguana/iguana_notary.c
  4. 4
      iguana/main.c

6
basilisk/jumblr.c

@ -587,7 +587,7 @@ void jumblr_utxotxidpendingadd(struct supernet_info *myinfo,char *dest,struct ig
pend.txid = txid; pend.txid = txid;
pend.vout = vout; pend.vout = vout;
pend.ind = ind; pend.ind = ind;
if ( shouldsplit == 0 && ind < 3 ) if ( myinfo->IAMLP == 0 && shouldsplit == 0 && ind < 3 )
{ {
if ( price > SMALLVAL ) if ( price > SMALLVAL )
{ {
@ -706,6 +706,8 @@ void jumblr_CMCname(char *CMCname,char *symbol)
void jumblr_DEXcheck(struct supernet_info *myinfo,struct iguana_info *coin) void jumblr_DEXcheck(struct supernet_info *myinfo,struct iguana_info *coin)
{ {
struct iguana_info *kmdcoin; struct iguana_info *kmdcoin;
if ( myinfo->IAMNOTARY != 0 )
return;
if ( (kmdcoin= iguana_coinfind("KMD")) == 0 || iguana_coinfind("BTC") == 0 ) if ( (kmdcoin= iguana_coinfind("KMD")) == 0 || iguana_coinfind("BTC") == 0 )
return; return;
//printf("jumblr_DEXcheck\n"); //printf("jumblr_DEXcheck\n");
@ -747,6 +749,8 @@ void jumblr_iteration(struct supernet_info *myinfo,struct iguana_info *coin,int3
{ {
//static uint32_t lasttime; //static uint32_t lasttime;
char BTCaddr[64],KMDaddr[64],*zaddr,*retstr; bits256 privkey; uint64_t amount=0,total=0; double fee; struct jumblr_item *ptr,*tmp; uint8_t r; char BTCaddr[64],KMDaddr[64],*zaddr,*retstr; bits256 privkey; uint64_t amount=0,total=0; double fee; struct jumblr_item *ptr,*tmp; uint8_t r;
if ( myinfo->IAMNOTARY != 0 )
return;
fee = JUMBLR_INCR * JUMBLR_FEE; fee = JUMBLR_INCR * JUMBLR_FEE;
OS_randombytes(&r,sizeof(r)); OS_randombytes(&r,sizeof(r));
//r = 0; //r = 0;

2
iguana/dpow/dpow_network.c

@ -1154,7 +1154,7 @@ char *_dex_listunspentarg(struct supernet_info *myinfo,char *symbol,char *addres
dexreq.func = arg; dexreq.func = arg;
if ( (retstr= _dex_sendrequeststr(myinfo,&dexreq,address,0,1,"")) != 0 ) if ( (retstr= _dex_sendrequeststr(myinfo,&dexreq,address,0,1,"")) != 0 )
{ {
printf("%s UNSPENTS.(%s)\n",symbol,retstr); //printf("_dex_listunspentarg: %s UNSPENTS.(%s)\n",symbol,retstr);
} }
return(_dex_arrayreturn(retstr)); return(_dex_arrayreturn(retstr));
} }

4
iguana/iguana_notary.c

@ -665,8 +665,8 @@ TWO_STRINGS(dex,listunspent,symbol,address)
return(retstr); return(retstr);
} }
} }
else if ( coin != 0 && coin->FULLNODE < 0 ) //else if ( coin != 0 && coin->FULLNODE < 0 )
return(jprint(dpow_listunspent(myinfo,coin,address),1)); // return(jprint(dpow_listunspent(myinfo,coin,address),1));
return(_dex_listunspent(myinfo,symbol,address)); return(_dex_listunspent(myinfo,symbol,address));
} }

4
iguana/main.c

@ -755,10 +755,10 @@ void jumblr_loop(void *ptr)
{ {
if ( (coin= iguana_coinfind("KMD")) != 0 ) if ( (coin= iguana_coinfind("KMD")) != 0 )
{ {
// if BTC has arrived in destination address, invoke DEX -> BTC
jumblr_DEXcheck(myinfo,coin);
if ( myinfo->jumblr_passphrase[0] != 0 && coin->FULLNODE < 0 ) if ( myinfo->jumblr_passphrase[0] != 0 && coin->FULLNODE < 0 )
{ {
// if BTC has arrived in destination address, invoke DEX -> BTC
jumblr_DEXcheck(myinfo,coin);
t = (uint32_t)time(NULL); t = (uint32_t)time(NULL);
if ( (t % (120 * mult)) < 60 ) if ( (t % (120 * mult)) < 60 )
{ {

Loading…
Cancel
Save