| 268 | } |
| 269 | |
| 270 | void payment_note(struct payment *p, enum log_level lvl, const char *fmt, ...) |
| 271 | { |
| 272 | va_list ap; |
| 273 | const char *str; |
| 274 | |
| 275 | va_start(ap, fmt); |
| 276 | str = tal_vfmt(p->paynotes, fmt, ap); |
| 277 | va_end(ap); |
| 278 | |
| 279 | tal_arr_expand(&p->paynotes, str); |
| 280 | /* Log at debug, unless it's weird... */ |
| 281 | plugin_log(pay_plugin->plugin, lvl < LOG_UNUSUAL ? LOG_DBG : lvl, "%s", |
| 282 | str); |
| 283 | |
| 284 | for (size_t i = 0; i < tal_count(p->cmd_array); i++) { |
| 285 | struct command *cmd = p->cmd_array[i]; |
| 286 | plugin_notify_message(cmd, lvl, "%s", str); |
| 287 | } |
| 288 | } |
| 289 | |
| 290 | static struct command_result *my_command_finish(struct payment *p, |
| 291 | struct command *cmd) |
no test coverage detected