jl777 7 years ago
parent
commit
04b1226fd2
  1. 4
      iguana/exchanges/LP_nativeDEX.c
  2. 4
      iguana/exchanges/LP_peers.c

4
iguana/exchanges/LP_nativeDEX.c

@ -860,7 +860,7 @@ void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint
{
LP_addpeer(mypeer,pubsock,default_LPnodes[i],myport,pushport,subport,0,G.LP_sessionid);
}
} else LP_addpeer(mypeer,pubsock,seednode,myport,pushport,subport,0,G.LP_sessionid);
} else LP_addpeer(mypeer,pubsock,seednode,myport,pushport,subport,1,G.LP_sessionid);
}
else
{
@ -881,7 +881,7 @@ void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint
//issue_LP_getpeers(default_LPnodes[i],myport);
//LP_peersquery(mypeer,pubsock,default_LPnodes[i],myport,"127.0.0.1",myport);
}
} else LP_addpeer(mypeer,pubsock,seednode,myport,pushport,subport,0,G.LP_sessionid);
} else LP_addpeer(mypeer,pubsock,seednode,myport,pushport,subport,1,G.LP_sessionid);
}
}

4
iguana/exchanges/LP_peers.c

@ -140,10 +140,10 @@ struct LP_peerinfo *LP_addpeer(struct LP_peerinfo *mypeer,int32_t mypubsock,char
pushsock = -1;
printf("error connecting to push.(%s)\n",pushaddr);
}
} else printf("%s pushport.%u subport.%u pushsock.%d\n",ipaddr,pushport,subport,pushsock);
} else printf("%s pushport.%u subport.%u pushsock.%d isLP.%d\n",ipaddr,pushport,subport,pushsock,isLP);
if ( peer->pushsock >= 0 && peer->subsock >= 0 )
{
printf("add peer %s isLP.%d\n",peer->ipaddr,peer->isLP);
//printf("add peer %s isLP.%d\n",peer->ipaddr,peer->isLP);
portable_mutex_lock(&LP_peermutex);
HASH_ADD(hh,LP_peerinfos,ip_port,sizeof(peer->ip_port),peer);
if ( mypeer != 0 )

Loading…
Cancel
Save