From 6ac935b5abe079bca164ac0df2cda98e3166d777 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 1 Mar 2017 09:23:48 +0200 Subject: [PATCH 1/2] Test --- iguana/main.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/iguana/main.c b/iguana/main.c index dbbb18958..4619501eb 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -461,10 +461,24 @@ rm BTC.xz; mksquashfs DB/BTC BTC.xz -comp xz -b 1048576 -comp xz -Xdict-size 102 https://github.com/vasi/squashfuse */ +void DEX_explorerloop(void *ptr) +{ + struct supernet_info *myinfo = ptr; + while ( 1 ) + { + if ( myinfo->DEXEXPLORER != 0 ) + { + kmd_bitcoinscan(); + } + usleep(100000); + } +} + void mainloop(struct supernet_info *myinfo) { struct iguana_info *coin; int32_t counter=0,depth; double lastmilli = 0; sleep(3); + iguana_launch(0,"DEX_explorerloop",DEX_explorerloop,myinfo,IGUANA_PERMTHREAD); printf("mainloop\n"); while ( 1 ) { @@ -484,11 +498,6 @@ void mainloop(struct supernet_info *myinfo) } usleep(30000); } - if ( myinfo->DEXEXPLORER != 0 ) - { - kmd_bitcoinscan(); - usleep(100000); - } //pangea_queues(SuperNET_MYINFO(0)); //if ( flag == 0 ) // usleep(100000 + isRT*100000 + (numpeers == 0)*1000000); From b8494fbfc202e7f32a853d5765e2dc03e1bd759f Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 1 Mar 2017 09:27:13 +0200 Subject: [PATCH 2/2] Test --- iguana/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/main.c b/iguana/main.c index 4619501eb..30758a494 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -478,7 +478,6 @@ void mainloop(struct supernet_info *myinfo) { struct iguana_info *coin; int32_t counter=0,depth; double lastmilli = 0; sleep(3); - iguana_launch(0,"DEX_explorerloop",DEX_explorerloop,myinfo,IGUANA_PERMTHREAD); printf("mainloop\n"); while ( 1 ) { @@ -761,6 +760,7 @@ void iguana_launchdaemons(struct supernet_info *myinfo) if ( COMMANDLINE_ARGFILE == 0 ) iguana_launch(0,"rpcloop",iguana_rpcloop,myinfo,IGUANA_PERMTHREAD); // limit to oneprocess printf("launch mainloop\n"); + OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)DEX_explorerloop,(void *)myinfo); mainloop(myinfo); }