Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
7870ab876c
  1. 2
      iguana/iguana_msg.c
  2. 4
      iguana/iguana_peers.c
  3. 3
      iguana/iguana_unspents.c

2
iguana/iguana_msg.c

@ -170,7 +170,7 @@ void iguana_gotversion(struct iguana_info *coin,struct iguana_peer *addr,struct
addr->dead = (uint32_t)time(NULL); addr->dead = (uint32_t)time(NULL);
if ( (vers->nServices & (1<<7)) == (1<<7) ) if ( (vers->nServices & (1<<7)) == (1<<7) )
addr->supernet = 1; addr->supernet = 1;
else printf("nServices.%lld nonce.%llu %srelay node.(%s) supernet.%d\n",(long long)vers->nServices,(long long)vers->nonce,addr->relayflag==0?"non-":"",addr->ipaddr,addr->supernet); //else printf("nServices.%lld nonce.%llu %srelay node.(%s) supernet.%d\n",(long long)vers->nServices,(long long)vers->nonce,addr->relayflag==0?"non-":"",addr->ipaddr,addr->supernet);
if ( vers->nStartingHeight > coin->longestchain ) if ( vers->nStartingHeight > coin->longestchain )
coin->longestchain = vers->nStartingHeight; coin->longestchain = vers->nStartingHeight;
iguana_queue_send(coin,addr,0,serialized,"getaddr",0,0,0); iguana_queue_send(coin,addr,0,serialized,"getaddr",0,0,0);

4
iguana/iguana_peers.c

@ -318,7 +318,9 @@ int32_t iguana_socket(int32_t bindflag,char *hostname,uint16_t port)
if ( result != 0 ) if ( result != 0 )
{ {
if ( errno != ECONNRESET && errno != ENOTCONN && errno != ECONNREFUSED && errno != ETIMEDOUT && errno != EHOSTUNREACH ) if ( errno != ECONNRESET && errno != ENOTCONN && errno != ECONNREFUSED && errno != ETIMEDOUT && errno != EHOSTUNREACH )
printf("%s(%s) port.%d failed: %s sock.%d. errno.%d\n",bindflag!=0?"bind":"connect",hostname,port,strerror(errno),sock,errno); {
//printf("%s(%s) port.%d failed: %s sock.%d. errno.%d\n",bindflag!=0?"bind":"connect",hostname,port,strerror(errno),sock,errno);
}
if ( sock >= 0 ) if ( sock >= 0 )
closesocket(sock); closesocket(sock);
return(-1); return(-1);

3
iguana/iguana_unspents.c

@ -862,7 +862,7 @@ int32_t iguana_realtime_update(struct iguana_info *coin)
} }
return(-1); return(-1);
} }
char str[65]; printf("RTheight.%d hwm.%d L.%d T.%d U.%d S.%d P.%d X.%d -> size.%ld %s\n",coin->RTheight,coin->blocks.hwmchain.height,coin->longestchain,dest->H.txidind,dest->H.unspentind,dest->H.spendind,dest->pkind,dest->externalind,(long)dest->H.data->allocsize,mbstr(str,dest->H.data->allocsize)); char str[65]; printf(">>>> RTheight.%d hwm.%d L.%d T.%d U.%d S.%d P.%d X.%d -> size.%ld %s\n",coin->RTheight,coin->blocks.hwmchain.height,coin->longestchain,dest->H.txidind,dest->H.unspentind,dest->H.spendind,dest->pkind,dest->externalind,(long)dest->H.data->allocsize,mbstr(str,dest->H.data->allocsize));
coin->RTheight++; coin->RTheight++;
coin->RTramchain.H.data->numblocks = bundlei + 1; coin->RTramchain.H.data->numblocks = bundlei + 1;
} else printf("error mapchaininit\n"); } else printf("error mapchaininit\n");
@ -875,6 +875,7 @@ int32_t iguana_realtime_update(struct iguana_info *coin)
} }
} }
} }
printf(" bp->hdrsi %d == %d coin->longestchain/coin->chain->bundlesize && bp->hdrsi %d == %d coin->balanceswritten && coin->RTheight %d >= %d bp->bundleheight && coin->RTheight %d < %d bp->bundleheight+bp->n\n",bp->hdrsi,coin->longestchain/coin->chain->bundlesize,bp->hdrsi,coin->balanceswritten,coin->RTheight,bp->bundleheight,coin->RTheight,bp->bundleheight+bp->n);
return(0); return(0);
} }

Loading…
Cancel
Save