diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-07-11 12:50:46 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-07-11 12:51:13 +0200 |
commit | 304eff3c614aa18f4d5d5d367024b0dbbb4dce4e (patch) | |
tree | c3eb19076b5fae16b78f9273d8a80e8c08dd457d | |
parent | 26316ffa7dc55fc191d7a981782685f5de961c20 (diff) | |
parent | 477777f2503e3a56a267556f0fc5091042d93340 (diff) |
Merge #8317: [rpcwallet] Don't use floating point
477777f [rpcwallet] Don't use floating point (MarcoFalke)
-rw-r--r-- | src/wallet/rpcwallet.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 8538f880ff..2747477fd9 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -564,8 +564,8 @@ UniValue getreceivedbyaddress(const UniValue& params, bool fHelp) if (!address.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address"); CScript scriptPubKey = GetScriptForDestination(address.Get()); - if (!IsMine(*pwalletMain,scriptPubKey)) - return (double)0.0; + if (!IsMine(*pwalletMain, scriptPubKey)) + return ValueFromAmount(0); // Minimum confirmations int nMinDepth = 1; @@ -643,7 +643,7 @@ UniValue getreceivedbyaccount(const UniValue& params, bool fHelp) } } - return (double)nAmount / (double)COIN; + return ValueFromAmount(nAmount); } |