From ec1c7ffcc7dd2535f9772ca7e5ba8862c02a1bc9 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 29 Mar 2019 07:10:46 -1100 Subject: [PATCH] Int64 --- src/komodo_gateway.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index b60399329..7a12f21bd 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -1579,19 +1579,19 @@ int32_t komodo_heightpricebits(uint32_t prevbits[4],int32_t nHeight) */ uint32_t komodo_pricenew(int32_t *maxflagp,uint32_t price,uint32_t refprice,int64_t tolerance) { - uint32_t highprice,lowprice; + uint64_t highprice,lowprice; highprice = ((uint64_t)refprice * (COIN + tolerance)) / COIN; // calc highest acceptable price lowprice = ((uint64_t)refprice * (COIN - tolerance)) / COIN; // and lowest if ( price >= highprice ) { - fprintf(stderr,"high %u vs h%u l%u\n",price,highprice,lowprice); + fprintf(stderr,"high %u vs h%llu l%llu tolerance.%llu\n",price,(long long)highprice,(long long)lowprice,(long long)tolerance); *maxflagp = 1; if ( price > highprice ) // return non-zero only if we violate the tolerance return(highprice); } else if ( price <= lowprice ) { - fprintf(stderr,"low %u vs h%u l%u\n",price,highprice,lowprice); + fprintf(stderr,"low %u vs h%llu l%llu tolerance.%llu\n",price,(long long)highprice,(long long)lowprice,(long long)tolerance); *maxflagp = -1; if ( price < lowprice ) return(lowprice);