mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
common: disallow NULL channel_id to peer_failed_err.
No more sending "all-channel" errors; in particular, gossipd now only sends warnings (which make us hang up), not errors, and peer_connected rejections are warnings (and disconnect), not errors. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Changed: Plugins: `peer_connected` rejections now send a warning, not an error, to the peer.
This commit is contained in:
@@ -12,25 +12,25 @@ struct channel_id;
|
||||
* towire_errorfmt - helper to turn string into WIRE_ERROR.
|
||||
*
|
||||
* @ctx: context to allocate from
|
||||
* @channel: specific channel to complain about, or NULL for all.
|
||||
* @channel: specific channel to complain about
|
||||
* @fmt: format for error.
|
||||
*/
|
||||
u8 *towire_errorfmt(const tal_t *ctx,
|
||||
const struct channel_id *channel,
|
||||
const char *fmt, ...) PRINTF_FMT(3,4);
|
||||
const char *fmt, ...) PRINTF_FMT(3,4) NON_NULL_ARGS(2);
|
||||
|
||||
/**
|
||||
* towire_errorfmtv - helper to turn string into WIRE_ERROR.
|
||||
*
|
||||
* @ctx: context to allocate from
|
||||
* @channel: specific channel to complain about, or NULL for all.
|
||||
* @channel: specific channel to complain about
|
||||
* @fmt: format for error.
|
||||
* @ap: accumulated varargs.
|
||||
*/
|
||||
u8 *towire_errorfmtv(const tal_t *ctx,
|
||||
const struct channel_id *channel,
|
||||
const char *fmt,
|
||||
va_list ap);
|
||||
va_list ap) NON_NULL_ARGS(2);
|
||||
|
||||
/**
|
||||
* towire_warningfmt - helper to turn string into WIRE_WARNING.
|
||||
|
||||
Reference in New Issue
Block a user