Skip to content

Commit 65808fa

Browse files
committed
fuzz: handle BroadcastChannelUpdate in chanmon
The regression was introduced in d627ce1. That change switched fee update opcodes in chanmon_consistency from maybe_update_chan_fees() to timer_tick_occurred(), which can enqueue BroadcastChannelUpdate events while peers are disconnected. The harness already tolerated those events in one delivery path, but still treated them as unreachable in push_excess_b_events and disconnect draining. Accept BroadcastChannelUpdate in those match arms so the fuzz target no longer panics on valid timer tick driven message queues. AI tools were used in preparing this commit.
1 parent 7ef91d1 commit 65808fa

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

fuzz/src/chanmon_consistency.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,6 +1608,7 @@ pub fn do_test<Out: Output + MaybeSend + MaybeSync>(data: &[u8], out: Out) {
16081608
},
16091609
MessageSendEvent::SendChannelReady { .. } => continue,
16101610
MessageSendEvent::SendAnnouncementSignatures { .. } => continue,
1611+
MessageSendEvent::BroadcastChannelUpdate { .. } => continue,
16111612
MessageSendEvent::SendChannelUpdate { ref node_id, .. } => {
16121613
if Some(*node_id) == expect_drop_id { panic!("peer_disconnected should drop msgs bound for the disconnected peer"); }
16131614
*node_id == a_id
@@ -1894,6 +1895,7 @@ pub fn do_test<Out: Output + MaybeSend + MaybeSync>(data: &[u8], out: Out) {
18941895
MessageSendEvent::SendStfu { .. } => {},
18951896
MessageSendEvent::SendChannelReady { .. } => {},
18961897
MessageSendEvent::SendAnnouncementSignatures { .. } => {},
1898+
MessageSendEvent::BroadcastChannelUpdate { .. } => {},
18971899
MessageSendEvent::SendChannelUpdate { .. } => {},
18981900
MessageSendEvent::HandleError { ref action, .. } => {
18991901
assert_action_timeout_awaiting_response(action);
@@ -1916,6 +1918,7 @@ pub fn do_test<Out: Output + MaybeSend + MaybeSync>(data: &[u8], out: Out) {
19161918
MessageSendEvent::SendStfu { .. } => {},
19171919
MessageSendEvent::SendChannelReady { .. } => {},
19181920
MessageSendEvent::SendAnnouncementSignatures { .. } => {},
1921+
MessageSendEvent::BroadcastChannelUpdate { .. } => {},
19191922
MessageSendEvent::SendChannelUpdate { .. } => {},
19201923
MessageSendEvent::HandleError { ref action, .. } => {
19211924
assert_action_timeout_awaiting_response(action);

0 commit comments

Comments
 (0)