MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / AmountFromValue

Function AmountFromValue

src/bitcoin-tx.cpp:537–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

535}
536
537static CAmount AmountFromValue(const UniValue& value)
538{
539 if (!value.isNum() && !value.isStr())
540 throw std::runtime_error("Amount is not a number or string");
541 CAmount amount;
542 if (!ParseFixedPoint(value.getValStr(), 8, &amount))
543 throw std::runtime_error("Invalid amount");
544 if (!MoneyRange(amount))
545 throw std::runtime_error("Amount out of range");
546 return amount;
547}
548
549static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
550{

Callers 1

MutateTxSignFunction · 0.70

Calls 4

ParseFixedPointFunction · 0.85
MoneyRangeFunction · 0.85
isNumMethod · 0.80
isStrMethod · 0.80

Tested by

no test coverage detected