diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2011-02-23 14:41:19 -0500 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2011-02-23 14:41:19 -0500 |
commit | 789259d2e72f28330dbe70e8acfdf752bd950b76 (patch) | |
tree | 2b2de73ef5313869b337c83dba058473926a704a /rpc.cpp | |
parent | 83b9f4279644d570a9d4629f23ef2f6e413167db (diff) |
Do not round input amounts; allow RPC full precision.
Diffstat (limited to 'rpc.cpp')
-rw-r--r-- | rpc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -65,7 +65,7 @@ int64 AmountFromValue(const Value& value) double dAmount = value.get_real(); if (dAmount <= 0.0 || dAmount > 21000000.0) throw JSONRPCError(-3, "Invalid amount"); - int64 nAmount = roundint64(dAmount * 100.00) * CENT; + int64 nAmount = roundint64(dAmount * COIN); if (!MoneyRange(nAmount)) throw JSONRPCError(-3, "Invalid amount"); return nAmount; |