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

Function splice_signed_get_result

plugins/spender/splice.c:1162–1186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1160}
1161
1162static struct command_result *splice_signed_get_result(struct command *cmd,
1163 const char *methodname,
1164 const char *buf,
1165 const jsmntok_t *result,
1166 struct splice_index_pkg *pkg)
1167{
1168 size_t index = pkg->index;
1169 struct splice_cmd *splice_cmd = pkg->splice_cmd;
1170 const jsmntok_t *tok;
1171
1172 tal_free(pkg);
1173
1174 tok = json_get_member(buf, result, "psbt");
1175 tal_free(splice_cmd->psbt);
1176 splice_cmd->psbt = json_to_psbt(splice_cmd, buf, tok);
1177
1178 tok = json_get_member(buf, result, "txid");
1179 if (!json_to_txid(buf, tok, &splice_cmd->final_txid))
1180 return command_fail_badparam(cmd, "txid", buf,
1181 tok, "invalid txid");
1182
1183 splice_cmd->states[index]->state = SPLICE_CMD_DONE;
1184
1185 return continue_splice(splice_cmd->cmd, splice_cmd);
1186}
1187
1188static struct command_result *splice_signed_error_pkg(struct command *cmd,
1189 const char *methodname,

Callers

nothing calls this directly

Calls 6

tal_freeFunction · 0.85
json_get_memberFunction · 0.85
json_to_psbtFunction · 0.85
continue_spliceFunction · 0.85
json_to_txidFunction · 0.50
command_fail_badparamFunction · 0.50

Tested by

no test coverage detected