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

Function after_getfeerate

plugins/spender/multifundchannel.c:1488–1510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1486}
1487
1488static struct command_result *
1489after_getfeerate(struct command *cmd,
1490 const char *buf,
1491 const jsmntok_t *result,
1492 struct multifundchannel_command *mfc)
1493{
1494 const char *err;
1495 u32 feerate;
1496
1497 plugin_log(mfc->cmd->plugin, LOG_DBG,
1498 "mfc %"PRIu64": 'parsefeerate' done", mfc->id);
1499
1500 err = json_scan(tmpctx, buf, result,
1501 "{perkw:%}",
1502 JSON_SCAN(json_to_number, &feerate));
1503 if (err)
1504 mfc_fail(mfc, JSONRPC2_INVALID_PARAMS,
1505 "Unable to parse feerate %s: %*.s",
1506 err, json_tok_full_len(result),
1507 json_tok_full(buf, result));
1508
1509 return perform_fundpsbt(mfc, feerate);
1510}
1511
1512static struct command_result *
1513getfeerate(struct multifundchannel_command *mfc)

Callers

nothing calls this directly

Calls 6

mfc_failFunction · 0.85
perform_fundpsbtFunction · 0.85
plugin_logFunction · 0.50
json_scanFunction · 0.50
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50

Tested by

no test coverage detected