MCPcopy Create free account
hub / github.com/LUX-Core/lux / AmountFromValue

Function AmountFromValue

src/rpcserver.cpp:117–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117CAmount AmountFromValue(const UniValue& value)
118{
119 if (!value.isReal() && !value.isNum())
120 throw JSONRPCError(RPC_TYPE_ERROR, "Amount is not a number");
121 CAmount amount;
122 if (!ParseFixedPoint(value.getValStr(), 8, &amount))
123 throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount");
124 if (!MoneyRange(amount))
125 throw JSONRPCError(RPC_TYPE_ERROR, "Amount out of range");
126 return amount;
127}
128
129uint256 ParseHashV(const UniValue& v, string strName)
130{

Callers 15

sendtoaddressFunction · 0.85
sendtoaddressixFunction · 0.85
listaddressbalancesFunction · 0.85
movecmdFunction · 0.85
sendfromFunction · 0.85
sendmanyFunction · 0.85
settxfeeFunction · 0.85
reservebalanceFunction · 0.85
rest_getutxosFunction · 0.85
fundrawtransactionFunction · 0.85
createrawtransactionFunction · 0.85
signrawtransactionFunction · 0.85

Calls 5

JSONRPCErrorFunction · 0.85
ParseFixedPointFunction · 0.85
MoneyRangeFunction · 0.85
isRealMethod · 0.80
isNumMethod · 0.80

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68