git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
d9979e5
)
Fix amount checking
author
user
<balthazar@yandex.ru>
Sun, 26 Dec 2021 09:34:59 +0000 (12:34 +0300)
committer
user
<balthazar@yandex.ru>
Sun, 26 Dec 2021 09:34:59 +0000 (12:34 +0300)
src/bitcoinrpc.cpp
patch
|
blob
|
history
diff --git
a/src/bitcoinrpc.cpp
b/src/bitcoinrpc.cpp
index
445f68c
..
06263b0
100644
(file)
--- a/
src/bitcoinrpc.cpp
+++ b/
src/bitcoinrpc.cpp
@@
-85,7
+85,7
@@
void RPCTypeCheck(const Object& o,
int64_t AmountFromValue(const Value& value)
{
double dAmount = value.get_real();
- if (dAmount <= 0.0 || dAmount > MAX_MONEY)
+ if (dAmount <= 0.0 || dAmount > (double) (MAX_MONEY / 100000000))
throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount");
int64_t nAmount = roundint64(dAmount * COIN);
if (!MoneyRange(nAmount))