From 5a557264fa1c98ef90f8ce8cb8c4fb5c58532782 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 27 Mar 2019 09:27:56 -1100 Subject: [PATCH] Test --- src/cc/games/prices.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/cc/games/prices.cpp b/src/cc/games/prices.cpp index 177417c9b..9178eb46b 100644 --- a/src/cc/games/prices.cpp +++ b/src/cc/games/prices.cpp @@ -42,12 +42,15 @@ int64_t prices_blockinfo(int32_t height,char *acaddr) { prizefund += tx.vout[0].nValue; GetOpReturnData(tx.vout[numvouts-1].scriptPubKey,vopret); - E_UNMARSHAL(vopret,ss >> pricebits); - timestamp = (uint32_t)(pricebits >> 32); - uprice = (uint32_t)pricebits; - if ( strcmp(acaddr,destaddr) == 0 ) - fprintf(stderr,"REF "); - fprintf(stderr,"[%02x] i.%d %.8f %llx t%u %.4f numvouts.%d %s lag.%d\n",tx.vout[numvouts-1].scriptPubKey[0],i,(double)tx.vout[0].nValue/COIN,(long long)pricebits,timestamp,(double)uprice/10000,numvouts,destaddr,(int32_t)(pindex->nTime-timestamp)); + if ( vopret.size() == 8 ) + { + E_UNMARSHAL(vopret,ss >> pricebits); + timestamp = (uint32_t)(pricebits >> 32); + uprice = (uint32_t)pricebits; + if ( strcmp(acaddr,destaddr) == 0 ) + fprintf(stderr,"REF "); + fprintf(stderr,"[%02x] i.%d %.8f %llx t%u %.4f numvouts.%d %s lag.%d\n",tx.vout[numvouts-1].scriptPubKey[0],i,(double)tx.vout[0].nValue/COIN,(long long)pricebits,timestamp,(double)uprice/10000,numvouts,destaddr,(int32_t)(pindex->nTime-timestamp)); + } else return(-3); } } return(prizefund);