From 5b8a3ef0a061c06b8075aa94ed1b87e3b17866c6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 8 Nov 2018 04:57:41 -1100 Subject: [PATCH] Test --- src/cc/dice.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cc/dice.cpp b/src/cc/dice.cpp index d2ef49587..553c0326f 100644 --- a/src/cc/dice.cpp +++ b/src/cc/dice.cpp @@ -268,7 +268,7 @@ int32_t dice_betspent(char *debugstr,uint256 bettxid) CSpentIndexKey key2(bettxid,1); if ( GetSpentIndex(key,value) != 0 || GetSpentIndex(key2,value2) != 0 ) { - //fprintf(stderr,"%s txid.%s already spent\n",debugstr,bettxid.GetHex().c_str()); + fprintf(stderr,"%s txid.%s already spent\n",debugstr,bettxid.GetHex().c_str()); return(1); } /*if ( mode > 0 ) @@ -304,11 +304,11 @@ void *dicefinish(void *_ptr) sleep(10); while ( 1 ) { + fprintf(stderr,"dicefinish process lastheight.%d <- newht.%d\n",lastheight,newht); if ( newht != 0 && lastheight != newht ) { lastheight = newht; newblock = 1; - fprintf(stderr,"dicefinish process lastheight.%d <- newht.%d\n",lastheight,newht); } else newblock = 0; for (iter=-1; iter<=1; iter+=2) { @@ -343,9 +343,11 @@ void *dicefinish(void *_ptr) } if ( vin0_needed > 0 ) { + fprintf(stderr,"iter.%d vin0_needed.%d\n",iter,vin0_needed); utxos = (struct dicefinish_utxo *)calloc(vin0_needed,sizeof(*utxos)); if ( (n= dicefinish_utxosget(num,utxos,vin0_needed,coinaddr)) > 0 ) { + fprintf(stderr,"iter.%d vin0_needed.%d got %d\n",iter,vin0_needed,n); m = 0; DL_FOREACH_SAFE(DICEFINISH_LIST,ptr,tmp) { @@ -359,9 +361,9 @@ void *dicefinish(void *_ptr) if ( ptr->txid != zeroid ) { CCduration(numblocks,ptr->txid); + fprintf(stderr,"numblocks %s %d\n",ptr->txid.GetHex().c_str(),numblocks); if ( numblocks > 0 ) { - fprintf(stderr,"alread confirmed %s\n",ptr->txid.GetHex().c_str()); continue; } }