diff options
| author | MarcoFalke <[email protected]> | 2016-07-08 12:01:39 +0200 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2016-07-08 12:01:25 +0200 |
| commit | 477777f2503e3a56a267556f0fc5091042d93340 (patch) | |
| tree | 2ca4fb9ef37dfb8b252ec06dada2089a8445d515 /src | |
| parent | Merge #7540: Rename OP_NOP3 to OP_CHECKSEQUENCEVERIFY (diff) | |
| download | discoin-477777f2503e3a56a267556f0fc5091042d93340.tar.xz discoin-477777f2503e3a56a267556f0fc5091042d93340.zip | |
[rpcwallet] Don't use floating point
Diffstat (limited to 'src')
| -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 8538f880f..2747477fd 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); } |