Mercurial > hg > bitcoin
changeset 452:f3328c788ebd draft
Do not round input amounts; allow RPC full precision.
author | Gavin Andresen <gavinandresen@gmail.com> |
---|---|
date | Wed, 23 Feb 2011 14:41:19 -0500 |
parents | 8ab8eaacaa18 |
children | a258e81cfdea |
files | rpc.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rpc.cpp +++ b/rpc.cpp @@ -65,7 +65,7 @@ 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;