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

Function SetOptionsInputWeights

src/wallet/rpc/spend.cpp:716–731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

714}
715
716static 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
733RPCHelpMan fundrawtransaction()
734{

Callers 2

sendFunction · 0.85
walletcreatefundedpsbtFunction · 0.85

Calls 5

JSONRPCErrorFunction · 0.85
existsMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
pushKVMethod · 0.45

Tested by

no test coverage detected