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

Function datastore_add_success

plugins/funder.c:185–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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