aboutsummaryrefslogtreecommitdiff
path: root/src/rpcserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpcserver.cpp')
-rw-r--r--src/rpcserver.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 190de62282..1a41344da5 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -88,18 +88,18 @@ static inline int64_t roundint64(double d)
return (int64_t)(d > 0 ? d + 0.5 : d - 0.5);
}
-int64_t AmountFromValue(const Value& value)
+CAmount AmountFromValue(const Value& value)
{
double dAmount = value.get_real();
if (dAmount <= 0.0 || dAmount > 21000000.0)
throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount");
- int64_t nAmount = roundint64(dAmount * COIN);
+ CAmount nAmount = roundint64(dAmount * COIN);
if (!MoneyRange(nAmount))
throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount");
return nAmount;
}
-Value ValueFromAmount(int64_t amount)
+Value ValueFromAmount(const CAmount& amount)
{
return (double)amount / (double)COIN;
}