Skip to content

Commit fab413c

Browse files
committed
Add a user_payment_id to get_payment_secret+PaymentReceived
This allows users to store metadata about an invoice at invoice-generation time and then index into that storage with a general-purpose id when they call `get_payment_secret`. They will then be provided the same index when the payment has been received.
1 parent bab8dbf commit fab413c

File tree

7 files changed

+60
-31
lines changed

7 files changed

+60
-31
lines changed

fuzz/src/chanmon_consistency.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ fn get_payment_secret_hash(dest: &ChanMan, payment_id: &mut u8) -> Option<(Payme
266266
let mut payment_hash;
267267
for _ in 0..256 {
268268
payment_hash = PaymentHash(Sha256::hash(&[*payment_id; 1]).into_inner());
269-
if let Ok(payment_secret) = dest.get_payment_secret(payment_hash, None, 1008) {
269+
if let Ok(payment_secret) = dest.get_payment_secret(payment_hash, None, 1008, 0) {
270270
return Some((payment_secret, payment_hash));
271271
}
272272
*payment_id = payment_id.wrapping_add(1);
@@ -687,7 +687,7 @@ pub fn do_test<Out: test_logger::Output>(data: &[u8], out: Out) {
687687
let had_events = !events.is_empty();
688688
for event in events.drain(..) {
689689
match event {
690-
events::Event::PaymentReceived { payment_hash, payment_secret, amt } => {
690+
events::Event::PaymentReceived { payment_hash, payment_secret, amt, user_payment_id: _ } => {
691691
if claim_set.insert(payment_hash.0) {
692692
if $fail {
693693
assert!(nodes[$node].fail_htlc_backwards(&payment_hash, &payment_secret));

fuzz/src/full_stack.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ pub fn do_test(data: &[u8], logger: &Arc<dyn Logger>) {
571571
Event::FundingGenerationReady { temporary_channel_id, channel_value_satoshis, output_script, .. } => {
572572
pending_funding_generation.push((temporary_channel_id, channel_value_satoshis, output_script));
573573
},
574-
Event::PaymentReceived { payment_hash, payment_secret, amt } => {
574+
Event::PaymentReceived { payment_hash, payment_secret, amt, user_payment_id: _ } => {
575575
//TODO: enhance by fetching random amounts from fuzz input?
576576
payments_received.push((payment_hash, payment_secret, amt));
577577
},

lightning/src/ln/chanmon_update_fail_tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ fn do_test_simple_monitor_temporary_update_fail(disconnect: bool, persister_fail
206206
let events_3 = nodes[1].node.get_and_clear_pending_events();
207207
assert_eq!(events_3.len(), 1);
208208
match events_3[0] {
209-
Event::PaymentReceived { ref payment_hash, ref payment_secret, amt } => {
209+
Event::PaymentReceived { ref payment_hash, ref payment_secret, amt, user_payment_id: _ } => {
210210
assert_eq!(payment_hash_1, *payment_hash);
211211
assert_eq!(Some(payment_secret_1), *payment_secret);
212212
assert_eq!(amt, 1000000);
@@ -574,7 +574,7 @@ fn do_test_monitor_temporary_update_fail(disconnect_count: usize) {
574574
let events_5 = nodes[1].node.get_and_clear_pending_events();
575575
assert_eq!(events_5.len(), 1);
576576
match events_5[0] {
577-
Event::PaymentReceived { ref payment_hash, ref payment_secret, amt } => {
577+
Event::PaymentReceived { ref payment_hash, ref payment_secret, amt, user_payment_id: _ } => {
578578
assert_eq!(payment_hash_2, *payment_hash);
579579
assert_eq!(Some(payment_secret_2), *payment_secret);
580580
assert_eq!(amt, 1000000);
@@ -688,7 +688,7 @@ fn test_monitor_update_fail_cs() {
688688
let events = nodes[1].node.get_and_clear_pending_events();
689689
assert_eq!(events.len(), 1);
690690
match events[0] {
691-
Event::PaymentReceived { payment_hash, payment_secret, amt } => {
691+
Event::PaymentReceived { payment_hash, payment_secret, amt, user_payment_id: _ } => {
692692
assert_eq!(payment_hash, our_payment_hash);
693693
assert_eq!(Some(our_payment_secret), payment_secret);
694694
assert_eq!(amt, 1000000);

lightning/src/ln/channelmanager.rs

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,8 @@ struct PeerState {
361361
struct PendingInboundPayment {
362362
/// The payment secret which the sender must use for us to accept this payment
363363
payment_secret: PaymentSecret,
364+
/// Arbitrary identifier the user specifies (or not)
365+
user_payment_id: u64,
364366
/// Height at which this HTLC expires - block height above this value will result in this
365367
/// payment being removed. Note that we'll reject any payments within HTLC_FAIL_BACK_BUFFER of
366368
/// the height at which they are received.
@@ -2010,15 +2012,16 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
20102012
fail_htlc!(htlc);
20112013
}
20122014
} else if total_value == payment_data.total_msat {
2013-
// Only ever generate at most one PaymentReceived
2014-
// per registered payment_hash, even if it isn't
2015-
// claimed.
2016-
inbound_payment.remove_entry();
20172015
new_events.push(events::Event::PaymentReceived {
20182016
payment_hash,
20192017
payment_secret: Some(payment_data.payment_secret),
20202018
amt: total_value,
2019+
user_payment_id: inbound_payment.get().user_payment_id,
20212020
});
2021+
// Only ever generate at most one PaymentReceived
2022+
// per registered payment_hash, even if it isn't
2023+
// claimed.
2024+
inbound_payment.remove_entry();
20222025
}
20232026
}
20242027
},
@@ -3370,6 +3373,12 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
33703373
/// secret fetched via this method or [`get_payment_secret`], and which is at least the `value`
33713374
/// provided here, if one is provided.
33723375
///
3376+
/// `user_payment_id` will be provided back in [`PaymentReceived::user_payment_id`] events to
3377+
/// allow tracking of which events correspond with which get_payment_secret_preimage calls.
3378+
/// user_payment_id has no meaning inside of LDK, it is simply copied to events and otherwise
3379+
/// ignored. It may be used to correlate PaymentReceived events with invoice metadata stored
3380+
/// elsewhere.
3381+
///
33733382
/// `min_value_msat` should be set if the invoice being generated contains a value. Any payment
33743383
/// received for the returned PaymentHash will be required to be at least `min_value_msat`
33753384
/// before a [`PaymentReceived`] event will be generated, ensuring that we do not provide the
@@ -3382,7 +3391,8 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
33823391
///
33833392
/// [`get_payment_secret`]: Self::get_payment_secret
33843393
/// [`PaymentReceived`]: events::Event::PaymentReceived
3385-
pub fn get_payment_secret_preimage(&self, min_value_msat: Option<u64>, invoice_expiry_delta_blocks: u32) -> (PaymentHash, PaymentSecret) {
3394+
/// [`PaymentReceived::user_payment_id`]: events::Event::PaymentReceived::user_payment_id
3395+
pub fn get_payment_secret_preimage(&self, min_value_msat: Option<u64>, invoice_expiry_delta_blocks: u32, user_payment_id: u64) -> (PaymentHash, PaymentSecret) {
33863396
assert!(invoice_expiry_delta_blocks <= 6*24*365); // We may overflow later if this value is too large
33873397

33883398
let payment_secret = PaymentSecret(self.keys_manager.get_secure_random_bytes());
@@ -3392,7 +3402,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
33923402
let _persistence_guard = PersistenceNotifierGuard::new(&self.total_consistency_lock, &self.persistence_notifier);
33933403
let mut payment_secrets = self.pending_inbound_payments.lock().unwrap();
33943404
if payment_secrets.insert(payment_hash, PendingInboundPayment {
3395-
payment_secret, min_value_msat,
3405+
payment_secret, min_value_msat, user_payment_id,
33963406
expiry_height: self.best_block.read().unwrap().height() + invoice_expiry_delta_blocks,
33973407
payment_preimage: Some(payment_preimage)
33983408
}).is_some() {
@@ -3411,6 +3421,12 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
34113421
/// The payment_hash (and corresponding payment preimage) must be globally unique. This method
34123422
/// may return an Err if another payment with the same payment_hash is still pending.
34133423
///
3424+
/// `user_payment_id` will be provided back in [`PaymentReceived::user_payment_id`] events to
3425+
/// allow tracking of which events correspond with which get_payment_secret_preimage calls.
3426+
/// user_payment_id has no meaning inside of LDK, it is simply copied to events and otherwise
3427+
/// ignored. It may be used to correlate PaymentReceived events with invoice metadata stored
3428+
/// elsewhere.
3429+
///
34143430
/// `min_value_msat` should be set if the invoice being generated contains a value. Any payment
34153431
/// received for the returned PaymentHash will be required to be at least `min_value_msat`
34163432
/// before a [`PaymentReceived`] event will be generated, ensuring that we do not provide the
@@ -3423,7 +3439,8 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
34233439
///
34243440
/// [`get_payment_secret_preimage`]: Self::get_payment_secret_preimage
34253441
/// [`PaymentReceived`]: events::Event::PaymentReceived
3426-
pub fn get_payment_secret(&self, payment_hash: PaymentHash, min_value_msat: Option<u64>, invoice_expiry_delta_blocks: u32) -> Result<PaymentSecret, APIError> {
3442+
/// [`PaymentReceived::user_payment_id`]: events::Event::PaymentReceived::user_payment_id
3443+
pub fn get_payment_secret(&self, payment_hash: PaymentHash, min_value_msat: Option<u64>, invoice_expiry_delta_blocks: u32, user_payment_id: u64) -> Result<PaymentSecret, APIError> {
34273444
assert!(invoice_expiry_delta_blocks <= 6*24*365); // We may overflow later if this value is too large
34283445

34293446
let payment_secret = PaymentSecret(self.keys_manager.get_secure_random_bytes());
@@ -3433,7 +3450,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
34333450
match payment_secrets.entry(payment_hash) {
34343451
hash_map::Entry::Vacant(e) => {
34353452
e.insert(PendingInboundPayment {
3436-
payment_secret, min_value_msat, payment_preimage: None,
3453+
payment_secret, min_value_msat, user_payment_id, payment_preimage: None,
34373454
expiry_height: self.best_block.read().unwrap().height() + invoice_expiry_delta_blocks,
34383455
});
34393456
},
@@ -4259,6 +4276,7 @@ impl Readable for HTLCForwardInfo {
42594276

42604277
impl_writeable!(PendingInboundPayment, 0, {
42614278
payment_secret,
4279+
user_payment_id,
42624280
expiry_height,
42634281
payment_preimage,
42644282
min_value_msat
@@ -4801,7 +4819,7 @@ pub mod bench {
48014819
payment_preimage.0[0..8].copy_from_slice(&payment_count.to_le_bytes());
48024820
payment_count += 1;
48034821
let payment_hash = PaymentHash(Sha256::hash(&payment_preimage.0[..]).into_inner());
4804-
let payment_secret = $node_b.get_payment_secret(payment_hash, None, 1008).unwrap();
4822+
let payment_secret = $node_b.get_payment_secret(payment_hash, None, 1008, 0).unwrap();
48054823

48064824
$node_a.send_payment(&route, payment_hash, &Some(payment_secret)).unwrap();
48074825
let payment_event = SendEvent::from_event($node_a.get_and_clear_pending_msg_events().pop().unwrap());

lightning/src/ln/functional_test_utils.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ macro_rules! get_payment_preimage_hash {
899899
let payment_preimage = PaymentPreimage([*$dest_node.network_payment_count.borrow(); 32]);
900900
*$dest_node.network_payment_count.borrow_mut() += 1;
901901
let payment_hash = PaymentHash(Sha256::hash(&payment_preimage.0[..]).into_inner());
902-
let payment_secret = $dest_node.node.get_payment_secret(payment_hash, None, 1008).unwrap();
902+
let payment_secret = $dest_node.node.get_payment_secret(payment_hash, None, 1008, 0).unwrap();
903903
(payment_preimage, payment_hash, payment_secret)
904904
}
905905
}
@@ -941,7 +941,7 @@ macro_rules! expect_payment_received {
941941
let events = $node.node.get_and_clear_pending_events();
942942
assert_eq!(events.len(), 1);
943943
match events[0] {
944-
Event::PaymentReceived { ref payment_hash, ref payment_secret, amt } => {
944+
Event::PaymentReceived { ref payment_hash, ref payment_secret, amt, user_payment_id: _ } => {
945945
assert_eq!($expected_payment_hash, *payment_hash);
946946
assert_eq!(Some($expected_payment_secret), *payment_secret);
947947
assert_eq!($expected_recv_value, amt);
@@ -1009,7 +1009,7 @@ pub fn pass_along_path<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_path
10091009
if payment_received_expected {
10101010
assert_eq!(events_2.len(), 1);
10111011
match events_2[0] {
1012-
Event::PaymentReceived { ref payment_hash, ref payment_secret, amt } => {
1012+
Event::PaymentReceived { ref payment_hash, ref payment_secret, amt, user_payment_id: _ } => {
10131013
assert_eq!(our_payment_hash, *payment_hash);
10141014
assert_eq!(Some(our_payment_secret), *payment_secret);
10151015
assert_eq!(amt, recv_value);

lightning/src/ln/functional_tests.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ fn test_duplicate_htlc_different_direction_onchain() {
14701470

14711471
let net_graph_msg_handler = &nodes[1].net_graph_msg_handler;
14721472
let route = get_route(&nodes[1].node.get_our_node_id(), &net_graph_msg_handler.network_graph.read().unwrap(), &nodes[0].node.get_our_node_id(), Some(InvoiceFeatures::known()), None, &Vec::new(), 800_000, TEST_FINAL_CLTV, &logger).unwrap();
1473-
let node_a_payment_secret = nodes[0].node.get_payment_secret(payment_hash, None, 1008).unwrap();
1473+
let node_a_payment_secret = nodes[0].node.get_payment_secret(payment_hash, None, 1008, 0).unwrap();
14741474
send_along_route_with_secret(&nodes[1], route, &[&[&nodes[0]]], 800_000, payment_hash, node_a_payment_secret);
14751475

14761476
// Provide preimage to node 0 by claiming payment
@@ -2070,15 +2070,15 @@ fn test_channel_reserve_holding_cell_htlcs() {
20702070
let events = nodes[2].node.get_and_clear_pending_events();
20712071
assert_eq!(events.len(), 2);
20722072
match events[0] {
2073-
Event::PaymentReceived { ref payment_hash, ref payment_secret, amt } => {
2073+
Event::PaymentReceived { ref payment_hash, ref payment_secret, amt, user_payment_id: _ } => {
20742074
assert_eq!(our_payment_hash_21, *payment_hash);
20752075
assert_eq!(Some(our_payment_secret_21), *payment_secret);
20762076
assert_eq!(recv_value_21, amt);
20772077
},
20782078
_ => panic!("Unexpected event"),
20792079
}
20802080
match events[1] {
2081-
Event::PaymentReceived { ref payment_hash, ref payment_secret, amt } => {
2081+
Event::PaymentReceived { ref payment_hash, ref payment_secret, amt, user_payment_id: _ } => {
20822082
assert_eq!(our_payment_hash_22, *payment_hash);
20832083
assert_eq!(Some(our_payment_secret_22), *payment_secret);
20842084
assert_eq!(recv_value_22, amt);
@@ -3646,7 +3646,7 @@ fn do_test_drop_messages_peer_disconnect(messages_delivered: u8) {
36463646
let events_2 = nodes[1].node.get_and_clear_pending_events();
36473647
assert_eq!(events_2.len(), 1);
36483648
match events_2[0] {
3649-
Event::PaymentReceived { ref payment_hash, ref payment_secret, amt } => {
3649+
Event::PaymentReceived { ref payment_hash, ref payment_secret, amt, user_payment_id: _ } => {
36503650
assert_eq!(payment_hash_1, *payment_hash);
36513651
assert_eq!(Some(payment_secret_1), *payment_secret);
36523652
assert_eq!(amt, 1000000);
@@ -3983,7 +3983,7 @@ fn test_drop_messages_peer_disconnect_dual_htlc() {
39833983
let events_5 = nodes[1].node.get_and_clear_pending_events();
39843984
assert_eq!(events_5.len(), 1);
39853985
match events_5[0] {
3986-
Event::PaymentReceived { ref payment_hash, ref payment_secret, amt: _ } => {
3986+
Event::PaymentReceived { ref payment_hash, ref payment_secret, amt: _, user_payment_id: _ } => {
39873987
assert_eq!(payment_hash_2, *payment_hash);
39883988
assert_eq!(Some(payment_secret_2), *payment_secret);
39893989
},
@@ -5113,7 +5113,7 @@ fn test_duplicate_payment_hash_one_failure_one_success() {
51135113

51145114
let (our_payment_preimage, duplicate_payment_hash, _) = route_payment(&nodes[0], &vec!(&nodes[1], &nodes[2])[..], 900000);
51155115

5116-
let payment_secret = nodes[3].node.get_payment_secret(duplicate_payment_hash, None, 1008).unwrap();
5116+
let payment_secret = nodes[3].node.get_payment_secret(duplicate_payment_hash, None, 1008, 0).unwrap();
51175117
let route = get_route(&nodes[0].node.get_our_node_id(), &nodes[0].net_graph_msg_handler.network_graph.read().unwrap(),
51185118
&nodes[3].node.get_our_node_id(), Some(InvoiceFeatures::known()), None, &Vec::new(), 900000, TEST_FINAL_CLTV, nodes[0].logger).unwrap();
51195119
send_along_route_with_secret(&nodes[0], route, &[&[&nodes[1], &nodes[2], &nodes[3]]], 900000, duplicate_payment_hash, payment_secret);
@@ -5307,30 +5307,30 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
53075307
let our_node_id = &nodes[1].node.get_our_node_id();
53085308
let route = get_route(our_node_id, &net_graph_msg_handler.network_graph.read().unwrap(), &nodes[5].node.get_our_node_id(), Some(InvoiceFeatures::known()), None, &Vec::new(), ds_dust_limit*1000, TEST_FINAL_CLTV, &logger).unwrap();
53095309
// 2nd HTLC:
5310-
send_along_route_with_secret(&nodes[1], route.clone(), &[&[&nodes[2], &nodes[3], &nodes[5]]], ds_dust_limit*1000, payment_hash_1, nodes[5].node.get_payment_secret(payment_hash_1, None, 1008).unwrap()); // not added < dust limit + HTLC tx fee
5310+
send_along_route_with_secret(&nodes[1], route.clone(), &[&[&nodes[2], &nodes[3], &nodes[5]]], ds_dust_limit*1000, payment_hash_1, nodes[5].node.get_payment_secret(payment_hash_1, None, 1008, 0).unwrap()); // not added < dust limit + HTLC tx fee
53115311
// 3rd HTLC:
5312-
send_along_route_with_secret(&nodes[1], route, &[&[&nodes[2], &nodes[3], &nodes[5]]], ds_dust_limit*1000, payment_hash_2, nodes[5].node.get_payment_secret(payment_hash_2, None, 1008).unwrap()); // not added < dust limit + HTLC tx fee
5312+
send_along_route_with_secret(&nodes[1], route, &[&[&nodes[2], &nodes[3], &nodes[5]]], ds_dust_limit*1000, payment_hash_2, nodes[5].node.get_payment_secret(payment_hash_2, None, 1008, 0).unwrap()); // not added < dust limit + HTLC tx fee
53135313
// 4th HTLC:
53145314
let (_, payment_hash_3, _) = route_payment(&nodes[0], &[&nodes[2], &nodes[3], &nodes[4]], 1000000);
53155315
// 5th HTLC:
53165316
let (_, payment_hash_4, _) = route_payment(&nodes[0], &[&nodes[2], &nodes[3], &nodes[4]], 1000000);
53175317
let route = get_route(our_node_id, &net_graph_msg_handler.network_graph.read().unwrap(), &nodes[5].node.get_our_node_id(), Some(InvoiceFeatures::known()), None, &Vec::new(), 1000000, TEST_FINAL_CLTV, &logger).unwrap();
53185318
// 6th HTLC:
5319-
send_along_route_with_secret(&nodes[1], route.clone(), &[&[&nodes[2], &nodes[3], &nodes[5]]], 1000000, payment_hash_3, nodes[5].node.get_payment_secret(payment_hash_3, None, 1008).unwrap());
5319+
send_along_route_with_secret(&nodes[1], route.clone(), &[&[&nodes[2], &nodes[3], &nodes[5]]], 1000000, payment_hash_3, nodes[5].node.get_payment_secret(payment_hash_3, None, 1008, 0).unwrap());
53205320
// 7th HTLC:
5321-
send_along_route_with_secret(&nodes[1], route, &[&[&nodes[2], &nodes[3], &nodes[5]]], 1000000, payment_hash_4, nodes[5].node.get_payment_secret(payment_hash_4, None, 1008).unwrap());
5321+
send_along_route_with_secret(&nodes[1], route, &[&[&nodes[2], &nodes[3], &nodes[5]]], 1000000, payment_hash_4, nodes[5].node.get_payment_secret(payment_hash_4, None, 1008, 0).unwrap());
53225322

53235323
// 8th HTLC:
53245324
let (_, payment_hash_5, _) = route_payment(&nodes[0], &[&nodes[2], &nodes[3], &nodes[4]], 1000000);
53255325
// 9th HTLC:
53265326
let route = get_route(our_node_id, &net_graph_msg_handler.network_graph.read().unwrap(), &nodes[5].node.get_our_node_id(), Some(InvoiceFeatures::known()), None, &Vec::new(), ds_dust_limit*1000, TEST_FINAL_CLTV, &logger).unwrap();
5327-
send_along_route_with_secret(&nodes[1], route, &[&[&nodes[2], &nodes[3], &nodes[5]]], ds_dust_limit*1000, payment_hash_5, nodes[5].node.get_payment_secret(payment_hash_5, None, 1008).unwrap()); // not added < dust limit + HTLC tx fee
5327+
send_along_route_with_secret(&nodes[1], route, &[&[&nodes[2], &nodes[3], &nodes[5]]], ds_dust_limit*1000, payment_hash_5, nodes[5].node.get_payment_secret(payment_hash_5, None, 1008, 0).unwrap()); // not added < dust limit + HTLC tx fee
53285328

53295329
// 10th HTLC:
53305330
let (_, payment_hash_6, _) = route_payment(&nodes[0], &[&nodes[2], &nodes[3], &nodes[4]], ds_dust_limit*1000); // not added < dust limit + HTLC tx fee
53315331
// 11th HTLC:
53325332
let route = get_route(our_node_id, &net_graph_msg_handler.network_graph.read().unwrap(), &nodes[5].node.get_our_node_id(), Some(InvoiceFeatures::known()), None, &Vec::new(), 1000000, TEST_FINAL_CLTV, &logger).unwrap();
5333-
send_along_route_with_secret(&nodes[1], route, &[&[&nodes[2], &nodes[3], &nodes[5]]], 1000000, payment_hash_6, nodes[5].node.get_payment_secret(payment_hash_6, None, 1008).unwrap());
5333+
send_along_route_with_secret(&nodes[1], route, &[&[&nodes[2], &nodes[3], &nodes[5]]], 1000000, payment_hash_6, nodes[5].node.get_payment_secret(payment_hash_6, None, 1008, 0).unwrap());
53345334

53355335
// Double-check that six of the new HTLC were added
53365336
// We now have six HTLCs pending over the dust limit and six HTLCs under the dust limit (ie,

0 commit comments

Comments
 (0)