aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/server.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2017-08-07 14:38:39 +0200
committerWladimir J. van der Laan <[email protected]>2017-08-07 17:01:21 +0200
commit46347add438d49a69f34a3f2ab755feda7daff10 (patch)
tree24025b570a23124335f6ce839a797bfc291102f7 /src/rpc/server.cpp
parentdoc: Correct AmountFromValue/ValueFromAmount names (diff)
downloaddiscoin-46347add438d49a69f34a3f2ab755feda7daff10.tar.xz
discoin-46347add438d49a69f34a3f2ab755feda7daff10.zip
rpc: Move ValueFromAmount to core_write
This is necessary because core_write has to write amounts in TxToUniv, and mistakingly uses FormatMoney for that (which is only for debugging). We don't move AmountFromValue at the same time, as this is more challenging due to the RPCError depencency there.
Diffstat (limited to 'src/rpc/server.cpp')
-rw-r--r--src/rpc/server.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp
index 63e4e9c63..58640d69d 100644
--- a/src/rpc/server.cpp
+++ b/src/rpc/server.cpp
@@ -123,16 +123,6 @@ CAmount AmountFromValue(const UniValue& value)
return amount;
}
-UniValue ValueFromAmount(const CAmount& amount)
-{
- bool sign = amount < 0;
- int64_t n_abs = (sign ? -amount : amount);
- int64_t quotient = n_abs / COIN;
- int64_t remainder = n_abs % COIN;
- return UniValue(UniValue::VNUM,
- strprintf("%s%d.%08d", sign ? "-" : "", quotient, remainder));
-}
-
uint256 ParseHashV(const UniValue& v, std::string strName)
{
std::string strHex;