jl777 7 years ago
parent
commit
6eb4ab4a6f
  1. 4
      iguana/exchanges/LP_nativeDEX.c
  2. 21
      iguana/exchanges/LP_privkey.c

4
iguana/exchanges/LP_nativeDEX.c

@ -544,7 +544,10 @@ void LP_coinsloop(void *_coins)
} }
} }
if ( coin->smartaddr[0] == 0 ) if ( coin->smartaddr[0] == 0 )
{
printf("%s has no smartaddress??\n",coin->symbol); printf("%s has no smartaddress??\n",coin->symbol);
continue;
}
memset(&zero,0,sizeof(zero)); memset(&zero,0,sizeof(zero));
if ( coin->inactive != 0 ) if ( coin->inactive != 0 )
continue; continue;
@ -1250,6 +1253,7 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu
#endif #endif
if ( IAMLP != 0 ) if ( IAMLP != 0 )
{ {
G.netid = juint(argjson,"netid");
LP_mypubsock = -1; LP_mypubsock = -1;
nanomsg_transportname(0,subaddr,myipaddr,mypubport); nanomsg_transportname(0,subaddr,myipaddr,mypubport);
nanomsg_transportname(1,bindaddr,myipaddr,mypubport); nanomsg_transportname(1,bindaddr,myipaddr,mypubport);

21
iguana/exchanges/LP_privkey.c

@ -377,16 +377,19 @@ int32_t LP_passphrase_init(char *passphrase,char *gui,uint16_t netid,char *seedn
ctx = bitcoin_ctx(); ctx = bitcoin_ctx();
if ( G.LP_pendingswaps != 0 ) if ( G.LP_pendingswaps != 0 )
return(-1); return(-1);
if ( IAMLP != 0 && netid != G.netid ) if ( netid != G.netid )
{ {
printf("sorry, LP nodes can only set netid during startup\n"); if ( IAMLP != 0 )
return(-1); {
} printf("sorry, LP nodes can only set netid during startup\n");
else if ( IAMLP == 0 && netid != G.netid ) return(-1);
{ }
printf("netid.%d vs G.netid %d\n",netid,G.netid); else
LP_closepeers(); {
LP_initpeers(LP_mypubsock,LP_mypeer,LP_myipaddr,RPC_port,netid,seednode); printf(">>>>>>>>>>>>> netid.%d vs G.netid %d\n",netid,G.netid);
LP_closepeers();
LP_initpeers(LP_mypubsock,LP_mypeer,LP_myipaddr,RPC_port,netid,seednode);
}
} }
G.initializing = 1; G.initializing = 1;
if ( gui == 0 ) if ( gui == 0 )

Loading…
Cancel
Save