Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
2fec595063
  1. 4
      iguana/SuperNET.c
  2. 2
      iguana/main.c

4
iguana/SuperNET.c

@ -484,12 +484,12 @@ void SuperNET_init(struct supernet_info *myinfo,uint16_t PUBport,uint16_t LBport
if ( ipaddr != 0 ) if ( ipaddr != 0 )
myinfo->LBsock = nn_createsocket(myinfo,myinfo->LBpoint,1,"NN_REP",NN_REP,myinfo->LBport,sendtimeout,recvtimeout); myinfo->LBsock = nn_createsocket(myinfo,myinfo->LBpoint,1,"NN_REP",NN_REP,myinfo->LBport,sendtimeout,recvtimeout);
} else myinfo->reqsock = -1; } else myinfo->reqsock = -1;
iguana_launch(iguana_coinadd("BTCD"),"SuperNET",SuperNET_loop,myinfo,IGUANA_PERMTHREAD);
if ( myinfo->LBsock >= 0 || myinfo->PUBsock >= 0 ) if ( myinfo->LBsock >= 0 || myinfo->PUBsock >= 0 )
{ {
iguana_launch(iguana_coinadd("BTCD"),"SuperNET",SuperNET_loop,myinfo,IGUANA_PERMTHREAD);
SuperNET_announce(myinfo,"ramchain"); SuperNET_announce(myinfo,"ramchain");
} else SuperNET_announce(myinfo,"pangea"); } else SuperNET_announce(myinfo,"pangea");
printf("LBsock.%d %d, PUBsock.%d %d\n",myinfo->LBsock,myinfo->reqsock,myinfo->PUBsock,myinfo->subsock); printf("%s LBsock.%d %d, %s PUBsock.%d %d\n",myinfo->LBpoint,myinfo->LBsock,myinfo->reqsock,myinfo->PUBpoint,myinfo->PUBsock,myinfo->subsock);
} }
#endif #endif

2
iguana/main.c

@ -328,7 +328,7 @@ void iguana_main(void *arg)
if ( arg != 0 ) if ( arg != 0 )
SuperNET_JSON(&MYINFO,cJSON_Parse(arg),0); SuperNET_JSON(&MYINFO,cJSON_Parse(arg),0);
#ifndef MINIGUANA #ifndef MINIGUANA
SuperNET_init(&MYINFO,MYINFO.PUBport,MYINFO.LBport); SuperNET_init(&MYINFO,0,0);
#endif #endif
//init_InstantDEX(); //init_InstantDEX();
while ( 1 ) while ( 1 )

Loading…
Cancel
Save