| 1510 | } |
| 1511 | |
| 1512 | static struct command_result * |
| 1513 | getfeerate(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 | /*~ |
no test coverage detected