]> git.bitcoin.ninja Git - rust-lightning/commitdiff
[fuzz] Fail in chanmon_consistency on IgnoreError error events
authorMatt Corallo <git@bluematt.me>
Tue, 24 Nov 2020 00:12:19 +0000 (19:12 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 1 Mar 2021 02:03:18 +0000 (21:03 -0500)
These should never appear, so consider them a fuzzer fail case.

fuzz/src/chanmon_consistency.rs

index dbc14ce1d3ed88f75f9972f1ea61735a94c7fc0b..52d2f59d5389b208df84ff5d835313b0af2e6cbf 100644 (file)
@@ -37,7 +37,7 @@ use lightning::chain::chaininterface::{BroadcasterInterface, ConfirmationTarget,
 use lightning::chain::keysinterface::{KeysInterface, InMemorySigner};
 use lightning::ln::channelmanager::{ChannelManager, PaymentHash, PaymentPreimage, PaymentSecret, PaymentSendFailure, ChannelManagerReadArgs};
 use lightning::ln::features::{ChannelFeatures, InitFeatures, NodeFeatures};
-use lightning::ln::msgs::{CommitmentUpdate, ChannelMessageHandler, DecodeError, ErrorAction, UpdateAddHTLC, Init};
+use lightning::ln::msgs::{CommitmentUpdate, ChannelMessageHandler, DecodeError, UpdateAddHTLC, Init};
 use lightning::util::enforcing_trait_impls::{EnforcingSigner, INITIAL_REVOKED_COMMITMENT_NUMBER};
 use lightning::util::errors::APIError;
 use lightning::util::events;
@@ -645,7 +645,6 @@ pub fn do_test<Out: test_logger::Output>(data: &[u8], out: Out) {
                                                        events::MessageSendEvent::SendChannelReestablish { .. } => {},
                                                        events::MessageSendEvent::SendFundingLocked { .. } => {},
                                                        events::MessageSendEvent::PaymentFailureNetworkUpdate { .. } => {},
-                                                       events::MessageSendEvent::HandleError { action: ErrorAction::IgnoreError, .. } => {},
                                                        _ => panic!("Unhandled message event"),
                                                }
                                        }
@@ -658,7 +657,6 @@ pub fn do_test<Out: test_logger::Output>(data: &[u8], out: Out) {
                                                        events::MessageSendEvent::SendChannelReestablish { .. } => {},
                                                        events::MessageSendEvent::SendFundingLocked { .. } => {},
                                                        events::MessageSendEvent::PaymentFailureNetworkUpdate { .. } => {},
-                                                       events::MessageSendEvent::HandleError { action: ErrorAction::IgnoreError, .. } => {},
                                                        _ => panic!("Unhandled message event"),
                                                }
                                        }
@@ -680,7 +678,6 @@ pub fn do_test<Out: test_logger::Output>(data: &[u8], out: Out) {
                                                },
                                                events::MessageSendEvent::SendFundingLocked { .. } => false,
                                                events::MessageSendEvent::PaymentFailureNetworkUpdate { .. } => false,
-                                               events::MessageSendEvent::HandleError { action: ErrorAction::IgnoreError, .. } => false,
                                                _ => panic!("Unhandled message event"),
                                        };
                                        if push { msg_sink.push(event); }