Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
1450a0477c
  1. 21
      iguana/iguana777.c

21
iguana/iguana777.c

@ -372,7 +372,15 @@ void iguana_helper(void *arg)
{ {
//iguana_jsonQ(); //iguana_jsonQ();
flag = 0; 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 ) if ( ptr->bp != 0 && (coin= ptr->coin) != 0 )
{ {
@ -400,17 +408,6 @@ void iguana_helper(void *arg)
iguana_balancecalc(ptr->coin,ptr->bp); iguana_balancecalc(ptr->coin,ptr->bp);
myfree(ptr,ptr->allocsize); 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 ) if ( flag == 0 )
usleep(1000000); usleep(1000000);
else usleep(100000); else usleep(100000);

Loading…
Cancel
Save