From 627df710c8e9985f90ec74fde7a00139620e4a9d Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 23 Nov 2020 19:12:31 -0500 Subject: [PATCH] [fuzz] Allow SendAnnouncementSigs events in chanmon_consistency Because of the merge between peer reconnection and channel monitor updating channel restoration code, we now sometimes generate (somewhat spurious) announcement signatures when restoring channel monitor updating. This should not result in a fuzzing failure. --- fuzz/src/chanmon_consistency.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fuzz/src/chanmon_consistency.rs b/fuzz/src/chanmon_consistency.rs index 52d2f59d5..43600bde2 100644 --- a/fuzz/src/chanmon_consistency.rs +++ b/fuzz/src/chanmon_consistency.rs @@ -624,6 +624,9 @@ pub fn do_test(data: &[u8], out: Out) { events::MessageSendEvent::SendFundingLocked { .. } => { // Can be generated as a reestablish response }, + events::MessageSendEvent::SendAnnouncementSignatures { .. } => { + // Can be generated as a reestablish response + }, events::MessageSendEvent::PaymentFailureNetworkUpdate { .. } => { // Can be generated due to a payment forward being rejected due to a // channel having previously failed a monitor update @@ -644,6 +647,7 @@ pub fn do_test(data: &[u8], out: Out) { events::MessageSendEvent::SendRevokeAndACK { .. } => {}, events::MessageSendEvent::SendChannelReestablish { .. } => {}, events::MessageSendEvent::SendFundingLocked { .. } => {}, + events::MessageSendEvent::SendAnnouncementSignatures { .. } => {}, events::MessageSendEvent::PaymentFailureNetworkUpdate { .. } => {}, _ => panic!("Unhandled message event"), } @@ -656,6 +660,7 @@ pub fn do_test(data: &[u8], out: Out) { events::MessageSendEvent::SendRevokeAndACK { .. } => {}, events::MessageSendEvent::SendChannelReestablish { .. } => {}, events::MessageSendEvent::SendFundingLocked { .. } => {}, + events::MessageSendEvent::SendAnnouncementSignatures { .. } => {}, events::MessageSendEvent::PaymentFailureNetworkUpdate { .. } => {}, _ => panic!("Unhandled message event"), } @@ -677,6 +682,7 @@ pub fn do_test(data: &[u8], out: Out) { if *node_id != drop_node_id { true } else { false } }, events::MessageSendEvent::SendFundingLocked { .. } => false, + events::MessageSendEvent::SendAnnouncementSignatures { .. } => false, events::MessageSendEvent::PaymentFailureNetworkUpdate { .. } => false, _ => panic!("Unhandled message event"), }; -- 2.39.5