Skip to content

Commit af51625

Browse files
committed
f nits
1 parent c1cd80a commit af51625

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

lightning/src/ln/max_payment_path_len_tests.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ fn large_payment_metadata() {
8484
macro_rules! get_payment_hash {
8585
($node: expr, $metadata: expr) => {{
8686
let payment_preimage = PaymentPreimage([counter; 32]);
87-
counter += 1;
87+
#[allow(unused_assignments)]
88+
{
89+
counter += 1;
90+
}
8891
let payment_hash: PaymentHash = payment_preimage.into();
8992
let payment_secret = $node
9093
.node
@@ -134,7 +137,7 @@ fn large_payment_metadata() {
134137
// Check that the payment parameter for max path length will prevent us from routing past our
135138
// next-hop peer given the payment_metadata size.
136139

137-
let (payment_hash_2, payment_preimage_2, payment_secret_2) =
140+
let (payment_hash_2, _, payment_secret_2) =
138141
get_payment_hash!(nodes[2], &max_sized_onion.payment_metadata.as_ref().unwrap());
139142
let (mut route_0_2, ..) = get_route_and_payment_hash!(&nodes[0], &nodes[2], amt_msat);
140143
let mut route_params_0_2 = route_0_2.route_params.clone().unwrap();
@@ -154,7 +157,7 @@ fn large_payment_metadata() {
154157
let mut too_large_onion = max_sized_onion.clone();
155158
too_large_onion.payment_metadata.as_mut().map(|mut md| md.push(42));
156159
too_large_onion.total_mpp_amount_msat = MIN_FINAL_VALUE_ESTIMATE_WITH_OVERPAY;
157-
let (payment_hash_2, payment_preimage_2, payment_secret_2) =
160+
let (payment_hash_2, _, payment_secret_2) =
158161
get_payment_hash!(nodes[2], &too_large_onion.payment_metadata.as_ref().unwrap());
159162
too_large_onion.payment_secret = Some(payment_secret_2);
160163

0 commit comments

Comments
 (0)