| 714 | } |
| 715 | |
| 716 | static void SetOptionsInputWeights(const UniValue& inputs, UniValue& options) |
| 717 | { |
| 718 | if (options.exists("input_weights")) { |
| 719 | throw JSONRPCError(RPC_INVALID_PARAMETER, "Input weights should be specified in inputs rather than in options."); |
| 720 | } |
| 721 | if (inputs.size() == 0) { |
| 722 | return; |
| 723 | } |
| 724 | UniValue weights(UniValue::VARR); |
| 725 | for (const UniValue& input : inputs.getValues()) { |
| 726 | if (input.exists("weight")) { |
| 727 | weights.push_back(input); |
| 728 | } |
| 729 | } |
| 730 | options.pushKV("input_weights", weights); |
| 731 | } |
| 732 | |
| 733 | RPCHelpMan fundrawtransaction() |
| 734 | { |
no test coverage detected