| 589 | } |
| 590 | |
| 591 | static 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 | |
| 603 | static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr) |
| 604 | { |
no test coverage detected