From 1450a0477c31088d724b6ad1176247915e662736 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 16 Mar 2016 23:59:45 -0300 Subject: [PATCH] test --- iguana/iguana777.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/iguana/iguana777.c b/iguana/iguana777.c index a93184b21..2e7961e88 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -372,7 +372,15 @@ void iguana_helper(void *arg) { //iguana_jsonQ(); flag = 0; - if ( (ptr= queue_dequeue(&emitQ,0)) != 0 || (ptr= queue_dequeue(&helperQ,0)) != 0 ) + if ( (ptr= queue_dequeue(&validateQ,0)) != 0 ) + { + if ( ptr->bp != 0 && ptr->coin != 0 ) + flag += iguana_bundlevalidate(ptr->coin,ptr->bp); + else printf("helper validate missing param? %p %p\n",ptr->coin,ptr->bp); + myfree(ptr,ptr->allocsize); + flag++; + } + else if ( (ptr= queue_dequeue(&emitQ,0)) != 0 || (ptr= queue_dequeue(&helperQ,0)) != 0 ) { if ( ptr->bp != 0 && (coin= ptr->coin) != 0 ) { @@ -400,17 +408,6 @@ void iguana_helper(void *arg) iguana_balancecalc(ptr->coin,ptr->bp); myfree(ptr,ptr->allocsize); } - else - { - if ( (ptr= queue_dequeue(&validateQ,0)) != 0 ) - { - if ( ptr->bp != 0 && ptr->coin != 0 ) - flag += iguana_bundlevalidate(ptr->coin,ptr->bp); - else printf("helper validate missing param? %p %p\n",ptr->coin,ptr->bp); - myfree(ptr,ptr->allocsize); - flag++; - } - } if ( flag == 0 ) usleep(1000000); else usleep(100000);