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

Function getfeerate

plugins/spender/multifundchannel.c:1460–1480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1458}
1459
1460static struct command_result *
1461getfeerate(struct multifundchannel_command *mfc)
1462{
1463 struct out_req *req;
1464 /* With the introduction of channel leases (option_will_fund),
1465 * we need to include enough in the PSBT to cover our expected
1466 * fees for the channel open. This requires that we know
1467 * the feerate ahead of time, so that we can figure the
1468 * expected lease fees, and add that to the funding amount. */
1469 req = jsonrpc_request_start(mfc->cmd,
1470 "parsefeerate",
1471 &after_getfeerate,
1472 &mfc_forward_error,
1473 mfc);
1474
1475 /* Internally, it defaults to 'opening', so we use that here */
1476 json_add_string(req->js, "feerate",
1477 mfc->feerate_str ? mfc->feerate_str: "opening");
1478
1479 return send_outreq(req);
1480}
1481
1482/*---------------------------------------------------------------------------*/
1483/*~

Callers 1

after_multiconnectFunction · 0.70

Calls 2

json_add_stringFunction · 0.50
send_outreqFunction · 0.50

Tested by

no test coverage detected