mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-04 14:54:26 +01:00
channel: skip unsaved channels
Now that "peer->channels" contains `unsaved` channels, skip overthem where appropriate
This commit is contained in:
@@ -714,10 +714,13 @@ void channel_notify_new_block(struct lightningd *ld,
|
||||
size_t i;
|
||||
|
||||
list_for_each (&ld->peers, peer, list) {
|
||||
list_for_each (&peer->channels, channel, list)
|
||||
list_for_each (&peer->channels, channel, list) {
|
||||
if (channel_unsaved(channel))
|
||||
continue;
|
||||
if (is_fundee_should_forget(ld, channel, block_height)) {
|
||||
tal_arr_expand(&to_forget, channel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Need to forget in a separate loop, else the above
|
||||
|
||||
Reference in New Issue
Block a user