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

Function feerate_get_result

plugins/spender/splice.c:791–813  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

789}
790
791static struct command_result *feerate_get_result(struct command *cmd,
792 const char *method,
793 const char *buf,
794 const jsmntok_t *result,
795 struct splice_cmd *splice_cmd)
796{
797 const jsmntok_t *tok = json_get_member(buf, result, "perkw");
798 tok = json_get_member(buf, tok, "splice");
799
800 if (!json_to_u32(buf, tok, &splice_cmd->feerate_per_kw))
801 return command_fail_badparam(cmd, "opening", buf,
802 tok, "invalid u32");
803
804 if (!splice_cmd->feerate_per_kw)
805 return command_fail(splice_cmd->cmd,
806 JSONRPC2_INVALID_PARAMS,
807 "Failed to load a default feerate");
808
809 plugin_log(cmd->plugin, LOG_DBG,
810 "got feerate %"PRIu32" perkw", splice_cmd->feerate_per_kw);
811
812 return continue_splice(splice_cmd->cmd, splice_cmd);
813}
814
815static struct command_result *load_feerate(struct command *cmd,
816 struct splice_cmd *splice_cmd)

Callers

nothing calls this directly

Calls 6

json_get_memberFunction · 0.85
continue_spliceFunction · 0.85
json_to_u32Function · 0.50
command_fail_badparamFunction · 0.50
command_failFunction · 0.50
plugin_logFunction · 0.50

Tested by

no test coverage detected