MCPcopy Create free account
hub / github.com/ElementsProject/lightning / getfeerate

Function getfeerate

plugins/spender/multifundchannel.c:1512–1534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1510}
1511
1512static struct command_result *
1513getfeerate(struct multifundchannel_command *mfc)
1514{
1515 struct out_req *req;
1516 /* With the introduction of channel leases (option_will_fund),
1517 * we need to include enough in the PSBT to cover our expected
1518 * fees for the channel open. This requires that we know
1519 * the feerate ahead of time, so that we can figure the
1520 * expected lease fees, and add that to the funding amount. */
1521 req = jsonrpc_request_start(mfc->cmd->plugin,
1522 mfc->cmd,
1523 "parsefeerate",
1524 &after_getfeerate,
1525 &mfc_forward_error,
1526 mfc);
1527
1528 /* Internally, it defaults to 'opening', so we use that here */
1529 if (!mfc->feerate_str)
1530 mfc->feerate_str = "opening";
1531 json_add_string(req->js, "feerate", mfc->feerate_str);
1532
1533 return send_outreq(mfc->cmd->plugin, req);
1534}
1535
1536/*---------------------------------------------------------------------------*/
1537/*~

Callers 1

after_multiconnectFunction · 0.70

Calls 2

json_add_stringFunction · 0.50
send_outreqFunction · 0.50

Tested by

no test coverage detected