From b6f98557c8467d35a92d7a5da74a49f42859ffce Mon Sep 17 00:00:00 2001 From: dimxy Date: Sat, 27 Apr 2019 15:32:08 +0500 Subject: [PATCH] totalbets check zero logging added --- src/cc/prices.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cc/prices.cpp b/src/cc/prices.cpp index 4e0235cd3..620188ddb 100644 --- a/src/cc/prices.cpp +++ b/src/cc/prices.cpp @@ -1338,10 +1338,11 @@ UniValue PricesInfo(uint256 bettxid, int32_t refheight) totalbets += b.amount; totalprofits += b.profits; costbasis += b.amount * (b.costbasis / PRICES_NORMFACTOR); // prevent overflow - std::cerr << "PricesInfo() acc costbasis=" << costbasis << " b.amount=" << b.amount << " b.costbasis=" << b.costbasis << std::endl; + std::cerr << "PricesInfo() acc costbasis=" << costbasis << " b.amount=" << b.amount << " b.costbasis/PRICES_NORMFACTOR=" << (b.costbasis / PRICES_NORMFACTOR) << std::endl; } int64_t equity = totalbets + totalprofits; + std::cerr << "PricesInfo() " << " totalbets=" << (totalbets / PRICES_NORMFACTOR) << std::endl; if (totalbets / PRICES_NORMFACTOR != 0) //prevent zero div costbasis /= (totalbets / PRICES_NORMFACTOR); else