mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-14 03:24:34 +01:00
is_all_channels: rename to channel_id_is_all
Suggested-by: Christian Decker Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
1954844fbf
commit
74e684cc0d
@@ -43,15 +43,8 @@ u8 *towire_errorfmt(const tal_t *ctx,
|
||||
return msg;
|
||||
}
|
||||
|
||||
bool is_all_channels(const struct channel_id *channel_id)
|
||||
bool channel_id_is_all(const struct channel_id *channel_id)
|
||||
{
|
||||
/* BOLT #1:
|
||||
*
|
||||
* A node receiving `error` MUST fail the channel referred to by the
|
||||
* message, or if `channel_id` is zero, it MUST fail all channels and
|
||||
* MUST close the connection. If no existing channel is referred to
|
||||
* by the message, the receiver MUST ignore the message.
|
||||
*/
|
||||
return memeqzero(channel_id, sizeof(*channel_id));
|
||||
}
|
||||
|
||||
@@ -86,7 +79,7 @@ char *sanitize_error(const tal_t *ctx, const u8 *errmsg,
|
||||
}
|
||||
|
||||
return tal_fmt(ctx, "channel %s: %.*s",
|
||||
is_all_channels(channel_id)
|
||||
channel_id_is_all(channel_id)
|
||||
? "ALL"
|
||||
: type_to_string(ctx, struct channel_id, channel_id),
|
||||
(int)tal_len(data), (char *)data);
|
||||
|
||||
Reference in New Issue
Block a user