Merge pull request #2133 from tnull/2023-03-pin-syn
[rust-lightning] / lightning / src / ln / onion_route_tests.rs
index 6ea8ab4ce1b28e837f69678ea037bbba86aaf7e4..a6fff59fd4fbafd453e823de3533d9ddc6b4097a 100644 (file)
@@ -13,6 +13,7 @@
 
 use crate::chain::channelmonitor::{CLTV_CLAIM_BUFFER, LATENCY_GRACE_PERIOD_BLOCKS};
 use crate::chain::keysinterface::{EntropySource, NodeSigner, Recipient};
+use crate::events::{Event, HTLCDestination, MessageSendEvent, MessageSendEventsProvider, PathFailure};
 use crate::ln::{PaymentHash, PaymentSecret};
 use crate::ln::channel::EXPIRE_PREV_CONFIG_TICKS;
 use crate::ln::channelmanager::{HTLCForwardInfo, FailureCode, CLTV_FAR_FAR_AWAY, MIN_CLTV_EXPIRY_DELTA, PendingAddHTLCInfo, PendingHTLCInfo, PendingHTLCRouting, PaymentId};
@@ -23,7 +24,6 @@ use crate::ln::features::{InitFeatures, InvoiceFeatures};
 use crate::ln::msgs;
 use crate::ln::msgs::{ChannelMessageHandler, ChannelUpdate};
 use crate::ln::wire::Encode;
-use crate::util::events::{Event, HTLCDestination, MessageSendEvent, MessageSendEventsProvider, PathFailure};
 use crate::util::ser::{Writeable, Writer};
 use crate::util::test_utils;
 use crate::util::config::{UserConfig, ChannelConfig};
@@ -848,7 +848,7 @@ fn do_test_fail_htlc_backwards_with_reason(failure_code: FailureCode) {
 
        expect_pending_htlcs_forwardable!(nodes[1]);
        expect_payment_claimable!(nodes[1], payment_hash, payment_secret, payment_amount);
-       nodes[1].node.fail_htlc_backwards_with_reason(&payment_hash, &failure_code);
+       nodes[1].node.fail_htlc_backwards_with_reason(&payment_hash, failure_code);
 
        expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], vec![HTLCDestination::FailedPayment { payment_hash: payment_hash }]);
        check_added_monitors!(nodes[1], 1);