Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
2211aaf5ef
  1. 2
      iguana/SuperNET.c
  2. 2
      iguana/SuperNET_category.c
  3. 2
      iguana/iguana_msg.c
  4. 2
      iguana/iguana_payments.c
  5. 4
      iguana/iguana_recv.c

2
iguana/SuperNET.c

@ -505,7 +505,7 @@ int32_t iguana_send_supernet(struct iguana_peer *addr,char *jsonstr,int32_t dela
printf(" cant decrypt cipherlen.%d otherpriv.%llx pub.%llx\n",cipherlen,(long long)testpriv.txid,(long long)pubkey.txid);
printf("encrypted mypriv.%llx destpub.%llx\n",(long long)privkey.txid,(long long)destpub.txid);
} // else printf("decrypted\n");
printf("send to (%s)\n",addr->ipaddr);
//printf("send to (%s)\n",addr->ipaddr);
qlen = iguana_queue_send(addr,delaymillis,&cipher[-sizeof(struct iguana_msghdr)],"SuperNETb",cipherlen,0,0);
if ( ptr != 0 )
free(ptr);

2
iguana/SuperNET_category.c

@ -225,7 +225,7 @@ char *bitcoin_hexmsg(struct supernet_info *myinfo,struct category_info *cat,void
}
}
}
printf("bitcoin_hexmsg.(%s) from %s (%s/%s)\n",ptr,remoteaddr,agent,method);
printf("bitcoin_hexmsg.(%s) from %s (%s/%s)\n",(char *)ptr,remoteaddr,agent,method);
return(retstr);
}

2
iguana/iguana_msg.c

@ -223,7 +223,7 @@ void iguana_gotverack(struct iguana_info *coin,struct iguana_peer *addr)
iguana_queue_send(addr,0,serialized,"getaddr",0,0,0);
if ( addr->supernet != 0 )
{
printf("send getpeers to %s\n",addr->ipaddr);
//printf("send getpeers to %s\n",addr->ipaddr);
iguana_send_supernet(addr,SUPERNET_GETPEERSTR,0);
}
}

2
iguana/iguana_payments.c

@ -495,7 +495,7 @@ char *sendtoaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *
jaddbits256(retjson,"result",signedtxid);
jaddstr(retjson,"signedtx",signedtx);
jadd(retjson,"complete",completed != 0 ? jtrue() : jfalse());
if ( 0 )
if ( 1 )
{
senttxid = iguana_sendrawtransaction(myinfo,coin,signedtx);
if ( bits256_cmp(senttxid,signedtxid) == 0 )

4
iguana/iguana_recv.c

@ -339,7 +339,7 @@ void iguana_gotblockM(struct iguana_info *coin,struct iguana_peer *addr,struct i
received[addr->addrind] += recvlen;
count[addr->addrind]++;
now = (uint32_t)time(NULL);
if ( ((rand() % 1000) == 0 && now > last+10) || now > last+60 )
if ( ((rand() % 1000) == 0 && now > last+10) || now > last+600 )
{
int64_t sum2 = 0,sum = 0,diffr,diff; double bw = 0.;
for (i=0; i<sizeof(received)/sizeof(*received); i++)
@ -764,7 +764,7 @@ void iguana_checklongestchain(struct iguana_info *coin,struct iguana_bundle *bp,
{
if ( coin->longestchain > bp->bundleheight+num+10*coin->chain->minconfirms )
{
printf("strange.%d suspicious longestchain.%d vs [%d:%d] %d bp->n %d\n",coin->longestchain_strange,coin->longestchain,bp->hdrsi,num,bp->bundleheight+num,bp->n);
//printf("strange.%d suspicious longestchain.%d vs [%d:%d] %d bp->n %d\n",coin->longestchain_strange,coin->longestchain,bp->hdrsi,num,bp->bundleheight+num,bp->n);
if ( coin->longestchain_strange++ > 10 )
{
coin->badlongestchain = coin->longestchain;

Loading…
Cancel
Save