From 5c3be4dfba68289b8d6fc8ca477ab3a23609f15c Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 20 Nov 2018 08:55:43 -1100 Subject: [PATCH] Fix false precision --- src/deprecation.h | 17 +++++++---------- src/wallet/rpcwallet.cpp | 4 +++- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/deprecation.h b/src/deprecation.h index 33782e1eb..32db73d23 100644 --- a/src/deprecation.h +++ b/src/deprecation.h @@ -6,11 +6,11 @@ #define ZCASH_DEPRECATION_H // Deprecation policy: -// * Shut down 16 weeks' worth of blocks after the estimated release block height. -// * A warning is shown during the 2 weeks' worth of blocks prior to shut down. -static const int APPROX_RELEASE_HEIGHT = 1102000; -static const int WEEKS_UNTIL_DEPRECATION = 24; -static const int DEPRECATION_HEIGHT = APPROX_RELEASE_HEIGHT + (WEEKS_UNTIL_DEPRECATION * 7 * 60 * 24); +// * Shut down WEEKS_UNTIL_DEPRECATION weeks' worth of blocks after the estimated release block height. +// * A warning is shown during the DEPRECATION_WARN_LIMIT worth of blocks prior to shut down. +static const int WEEKS_UNTIL_DEPRECATION = 52; +static const int DEPRECATION_HEIGHT = 1600000; +static const int APPROX_RELEASE_HEIGHT = DEPRECATION_HEIGHT - (WEEKS_UNTIL_DEPRECATION * 7 * 24 * 60); // Number of blocks before deprecation to warn users static const int DEPRECATION_WARN_LIMIT = 60 * 24 * 60; // 2 months @@ -18,11 +18,8 @@ static const int DEPRECATION_WARN_LIMIT = 60 * 24 * 60; // 2 months /** * Checks whether the node is deprecated based on the current block height, and * shuts down the node with an error if so (and deprecation is not disabled for - * the current client version). Warning and error messages are sent to the debug - * log, the metrics UI, and (if configured) -alertnofity. - * - * fThread means run -alertnotify in a free-running thread. + * the current client version). */ -void EnforceNodeDeprecation(int nHeight, bool forceLogging=false, bool fThread=true); +void EnforceNodeDeprecation(int nHeight, bool forceLogging=false); #endif // ZCASH_DEPRECATION_H diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index f006bf876..08720dd6b 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -6668,8 +6668,10 @@ UniValue dicestatus(const UniValue& params, bool fHelp) { if ( params.size() == 3 ) { + int64_t val; + val = winnings * COIN + 0.00000000499999; result.push_back(Pair("status", "win")); - result.push_back(Pair("won", winnings)); + result.push_back(Pair("won", ValueFromAmount(val))); } else {