mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 22:54:25 +01:00
Add assertion to clarify assumption made in order to avoid UB
This commit is contained in:
committed by
Christian Decker
parent
eb0603bd13
commit
5474512c31
@@ -316,7 +316,7 @@ static void random_mark_channel_unroutable(struct log *log,
|
||||
size_t i;
|
||||
const struct short_channel_id *channel;
|
||||
u8 *msg;
|
||||
assert(tal_len(route_channels) != 0);
|
||||
assert(num_channels != 0);
|
||||
|
||||
/* Select one channel by random. */
|
||||
randombytes_buf(&i, sizeof(i));
|
||||
|
||||
Reference in New Issue
Block a user