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

Function datastore_add_success

plugins/funder.c:191–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191static struct command_result *
192datastore_add_success(struct command *cmd,
193 const char *method,
194 const char *buf,
195 const jsmntok_t *result,
196 struct wally_psbt *signed_psbt)
197{
198 const char *key, *err;
199
200 err = json_scan(tmpctx, buf, result,
201 "{key:%}",
202 JSON_SCAN_TAL(cmd, json_strdup, &key));
203
204 if (err)
205 plugin_err(cmd->plugin,
206 "`datastore` payload did not scan. %s: %.*s",
207 err, json_tok_full_len(result),
208 json_tok_full(buf, result));
209
210 /* We saved the infos! */
211 plugin_log(cmd->plugin, LOG_DBG,
212 "Saved utxos for channel (%s) to datastore",
213 key);
214
215 return command_hook_cont_psbt(cmd, signed_psbt);
216}
217
218static struct command_result *
219remember_channel_utxos(struct command *cmd,

Callers

nothing calls this directly

Calls 6

command_hook_cont_psbtFunction · 0.85
plugin_errFunction · 0.70
plugin_logFunction · 0.70
json_scanFunction · 0.50
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50

Tested by

no test coverage detected