| 1458 | } |
| 1459 | |
| 1460 | static struct command_result * |
| 1461 | getfeerate(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 | /*~ |
no test coverage detected