From 57ef70d08eba39274364120167304bcc398f43ea Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Thu, 25 Apr 2019 10:48:21 +0800 Subject: [PATCH] fix notarizations left math error --- src/rpc/misc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index c2ba9d702..e8010ede3 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -1299,11 +1299,11 @@ UniValue getnotarypayinfo(const UniValue& params, bool fHelp) balance = checkburnaddress(received, TotalNotaryPay, height, "REDVp3ox1pbcWYCzySadfHhk8UU3HM4k5x"); notarycount = komodo_notaries(notarypubkeys, height, chainActive[height]->GetBlockTime()); - NotaryPay = komodo_notarypayamount(height, notarycount); + NotaryPay = komodo_notarypayamount(height, notarycount)*notarycount; bool spent = (received != balance); if ( !spent ) { - notaleft = (balance - TotalNotaryPay) / NotaryPay; + notaleft = ((int64_t)balance - TotalNotaryPay) / NotaryPay; daysleft = (((ASSETCHAINS_BLOCKTIME * 5) * notaleft) / 3600) / 24; endheight = (notaleft * 5) + height; }