From ca1ee9a8c1846fe6e7ce714785ec57793158ee68 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 28 Mar 2019 03:18:06 -1100 Subject: [PATCH] syntax --- src/komodo_gateway.h | 6 ++---- src/komodo_utils.h | 4 ++-- src/main.cpp | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 46fc1d805..26443d41f 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -1554,9 +1554,7 @@ CScript komodo_mineropret(int32_t nHeight) { CScript opret; if ( Mineropret.size() != 0 ) - { - opret << OP_RETURN << Mineropret); - } + return(opret << OP_RETURN << Mineropret); return(opret); } @@ -1569,7 +1567,7 @@ int32_t komodo_opretvalidate(int32_t nHeight,CScript scriptPubKey) if ( vopret.size() == sizeof(pricebits) ) { memcpy(pricebits,&Mineropret[0],sizeof(pricebits)); - fprintf(stderr,"ht.%d: t%u %.4f USD, %.4f GBP, %.4f EUR\n",nHeight,pricebits[0],(double)pricebits[1]/10000,(double)pricebits[2]/10000,(double)pricebits[3]/10000) + fprintf(stderr,"ht.%d: t%u %.4f USD, %.4f GBP, %.4f EUR\n",nHeight,pricebits[0],(double)pricebits[1]/10000,(double)pricebits[2]/10000,(double)pricebits[3]/10000); return(0); } return(-1); diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 2702772f8..fa3278fda 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1814,8 +1814,8 @@ void komodo_args(char *argv0) hexstr = GetArg("-ac_mineropret",""); if ( hexstr.size() != 0 ) { - Mineropret.resize(hexstr.size()/2) - decode_hex(&Mineropret,hexstr.size()/2,(char *)hexstr.c_str()); + Mineropret.resize(hexstr.size()/2); + decode_hex(&Mineropret[0],hexstr.size()/2,(char *)hexstr.c_str()); for (i=0; i