| 183 | } |
| 184 | |
| 185 | static struct command_result * |
| 186 | datastore_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 | |
| 212 | static struct command_result * |
| 213 | remember_channel_utxos(struct command *cmd, |
nothing calls this directly
no test coverage detected