Optionally parameterize decode_tlv_stream with custom decode closure
[rust-lightning] / lightning / src / chain / channelmonitor.rs
index bfb6e1ab3a8b72f363d948c539fd2ee212540bfa..748adbd035983b574bccd4836e2f6aecd48a9323 100644 (file)
@@ -3162,8 +3162,10 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
                        let htlc_claim = HTLCClaim::from_witness(&input.witness);
                        let revocation_sig_claim = htlc_claim == Some(HTLCClaim::Revocation);
                        let accepted_preimage_claim = htlc_claim == Some(HTLCClaim::AcceptedPreimage);
+                       #[cfg(not(fuzzing))]
                        let accepted_timeout_claim = htlc_claim == Some(HTLCClaim::AcceptedTimeout);
                        let offered_preimage_claim = htlc_claim == Some(HTLCClaim::OfferedPreimage);
+                       #[cfg(not(fuzzing))]
                        let offered_timeout_claim = htlc_claim == Some(HTLCClaim::OfferedTimeout);
 
                        let mut payment_preimage = PaymentPreimage([0; 32]);
@@ -3765,8 +3767,7 @@ mod tests {
        use ln::{PaymentPreimage, PaymentHash};
        use ln::chan_utils;
        use ln::chan_utils::{HTLCOutputInCommitment, ChannelPublicKeys, ChannelTransactionParameters, HolderCommitmentTransaction, CounterpartyChannelTransactionParameters};
-       use ln::channelmanager::PaymentSendFailure;
-       use ln::features::InitFeatures;
+       use ln::channelmanager::{self, PaymentSendFailure};
        use ln::functional_test_utils::*;
        use ln::script::ShutdownScript;
        use util::errors::APIError;
@@ -3795,9 +3796,9 @@ mod tests {
                let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[None, None, None]);
                let nodes = create_network(3, &node_cfgs, &node_chanmgrs);
                let channel = create_announced_chan_between_nodes(
-                       &nodes, 0, 1, InitFeatures::known(), InitFeatures::known());
+                       &nodes, 0, 1, channelmanager::provided_init_features(), channelmanager::provided_init_features());
                create_announced_chan_between_nodes(
-                       &nodes, 1, 2, InitFeatures::known(), InitFeatures::known());
+                       &nodes, 1, 2, channelmanager::provided_init_features(), channelmanager::provided_init_features());
 
                // Rebalance somewhat
                send_payment(&nodes[0], &[&nodes[1]], 10_000_000);