MCPcopy Create free account
hub / github.com/ElementsProject/elements / AmountFromValue

Function AmountFromValue

src/bitcoin-tx.cpp:591–601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

589}
590
591static CAmount AmountFromValue(const UniValue& value)
592{
593 if (!value.isNum() && !value.isStr())
594 throw std::runtime_error("Amount is not a number or string");
595 CAmount amount;
596 if (!ParseFixedPoint(value.getValStr(), 8, &amount))
597 throw std::runtime_error("Invalid amount");
598 if (!MoneyRange(amount))
599 throw std::runtime_error("Amount out of range");
600 return amount;
601}
602
603static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
604{

Callers 1

MutateTxSignFunction · 0.70

Calls 4

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

Tested by

no test coverage detected