From 1ccb4331f9ef46591393c4519a68a5d67697a13d Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 3 Jun 2016 12:45:30 -0300 Subject: [PATCH] test --- iguana/iguana777.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iguana/iguana777.c b/iguana/iguana777.c index 598cb1417..508b500a5 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -686,8 +686,6 @@ void iguana_coinloop(void *arg) coins++; printf("begin coinloop[%d]\n",n); coin = coins[0]; - if ( coin->peers == 0 ) - coin->peers = calloc(1,sizeof(*coin->peers)); iguana_launchpeer(coin,"127.0.0.1"); memset(zero.bytes,0,sizeof(zero)); while ( 1 ) @@ -937,7 +935,9 @@ int32_t iguana_launchcoin(struct supernet_info *myinfo,char *symbol,cJSON *json) { coins[0] = (void *)((long)1); coins[1] = coin; - printf("launch coinloop for.%s services.%llx started.%p\n",coin->symbol,(long long)services,coin->started); + printf("launch coinloop for.%s services.%llx started.%p peers.%p\n",coin->symbol,(long long)services,coin->started,coin->peers); + if ( coin->peers == 0 ) + coin->peers = calloc(1,sizeof(*coin->peers)); coin->launched = iguana_launch(coin,"iguana_coinloop",iguana_coinloop,coins,IGUANA_PERMTHREAD); coin->active = 1; coin->started = 0;