From: Matt Corallo Date: Tue, 24 Nov 2020 00:12:31 +0000 (-0500) Subject: [fuzz] Allow SendAnnouncementSigs events in chanmon_consistency X-Git-Tag: v0.0.98~20^2~9 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=1fa2da391cd4bd51e8157a8a8ea05c6afc74a070;p=rust-lightning [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. --- diff --git a/fuzz/src/chanmon_consistency.rs b/fuzz/src/chanmon_consistency.rs index 6dbc3a6cb..d28481123 100644 --- a/fuzz/src/chanmon_consistency.rs +++ b/fuzz/src/chanmon_consistency.rs @@ -603,6 +603,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 @@ -623,6 +626,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"), } @@ -635,6 +639,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 +661,7 @@ pub fn do_test(data: &[u8], out: Out) { if *node_id != drop_node_id { true } else { panic!("peer_disconnected should drop msgs bound for the disconnected peer"); } }, events::MessageSendEvent::SendFundingLocked { .. } => false, + events::MessageSendEvent::SendAnnouncementSignatures { .. } => false, events::MessageSendEvent::PaymentFailureNetworkUpdate { .. } => false, _ => panic!("Unhandled message event"), };