Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
f4be9b5d66
  1. 2
      iguana/SuperNET.c
  2. 4
      iguana/iguana_instantdex.c
  3. 2
      iguana/iguana_realtime.c

2
iguana/SuperNET.c

@ -719,7 +719,7 @@ char *SuperNET_JSON(struct supernet_info *myinfo,cJSON *json,char *remoteaddr,ui
{
if ( SuperNET_hexmsgfind(myinfo,category,subhash,hexmsg,0) < 0 )
{
printf("FORWARD.(%s)\n",hexmsg);
//printf("FORWARD.(%s)\n",hexmsg);
newflag = 1;
SuperNET_hexmsgadd(myinfo,category,subhash,hexmsg,tai_now(),remoteaddr);
forwardstr = SuperNET_forward(myinfo,hexmsg,destipbits,category,subhash,maxdelay,juint(json,"broadcast"),juint(json,"plaintext")!=0);

4
iguana/iguana_instantdex.c

@ -1014,7 +1014,7 @@ struct instantdex_accept *instantdex_acceptable(struct supernet_info *myinfo,str
else free(ap);
}
portable_mutex_unlock(&exchange->mutex);
printf("after acceptable Qsize.%d retap.%p\n",queue_size(&exchange->acceptableQ),retap);
//printf("after acceptable Qsize.%d retap.%p\n",queue_size(&exchange->acceptableQ),retap);
return(retap);
}
@ -1172,10 +1172,8 @@ char *instantdex_checkoffer(struct supernet_info *myinfo,uint64_t *txidp,struct
{
printf("instantdex_checkoffer add.%llu from.%llu to acceptableQ\n",(long long)myap->orderid,(long long)myap->offer.account);
queue_enqueue("acceptableQ",&exchange->acceptableQ,&myap->DL,0);
printf("Qsize.%d\n",queue_size(&exchange->acceptableQ));
if ( instantdex_offerfind(myinfo,exchange,0,0,myap->orderid,myap->offer.base,myap->offer.rel,1,0) == 0 )
printf("cant find just added to acceptableQ\n");
printf("Qsize.%d\n",queue_size(&exchange->acceptableQ));
}
return(jprint(instantdex_offerjson(&myap->offer,myap->orderid),1));
}

2
iguana/iguana_realtime.c

@ -257,7 +257,7 @@ int32_t iguana_realtime_update(struct iguana_info *coin)
if ( bits256_cmp(coin->RThash1,bp->hashes[1]) != 0 )
coin->RThash1 = bp->hashes[1];
bp->lastRT = (uint32_t)time(NULL);
if ( coin->RTheight < coin->longestchain && coin->peers.numranked > 0 && time(NULL) > coin->RThdrstime+10 )
if ( coin->RTheight <= coin->longestchain-2*(strcmp("BTC",coin->symbol)!=0) && coin->peers.numranked > 0 && time(NULL) > coin->RThdrstime+10 )
{
iguana_RThdrs(coin,bp,coin->peers.numranked);
coin->RThdrstime = bp->lastRT;

Loading…
Cancel
Save