]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Merge pull request #3291 from tnull/2024-09-add-their-node-id-routing-msg-handler
authorMatt Corallo <649246+TheBlueMatt@users.noreply.github.com>
Wed, 11 Sep 2024 22:25:41 +0000 (22:25 +0000)
committerGitHub <noreply@github.com>
Wed, 11 Sep 2024 22:25:41 +0000 (22:25 +0000)
Add node id to remaining `RoutingMessageHandler::handle_` methods

1  2 
lightning/src/ln/channelmanager.rs
lightning/src/ln/offers_tests.rs

Simple merge
index 8e4de107a28f7c5d2b1d9038e8c33bc50cbdd5bb,bf7c48142ef76400a95d7f2574d3cbd3ad814ba2..689441b81faadd7b750b7d8815c6d401d1e01be9
@@@ -575,12 -576,12 +576,12 @@@ fn creates_and_pays_for_offer_using_two
        assert_eq!(reply_path.introduction_node(), &IntroductionNode::NodeId(charlie_id));
  
        let onion_message = alice.onion_messenger.next_onion_message_for_peer(charlie_id).unwrap();
-       charlie.onion_messenger.handle_onion_message(&alice_id, &onion_message);
+       charlie.onion_messenger.handle_onion_message(alice_id, &onion_message);
  
        let onion_message = charlie.onion_messenger.next_onion_message_for_peer(david_id).unwrap();
-       david.onion_messenger.handle_onion_message(&charlie_id, &onion_message);
+       david.onion_messenger.handle_onion_message(charlie_id, &onion_message);
  
 -      let (invoice, _) = extract_invoice(david, &onion_message);
 +      let (invoice, reply_path) = extract_invoice(david, &onion_message);
        assert_eq!(invoice.amount_msats(), 10_000_000);
        assert_ne!(invoice.signing_pubkey(), alice_id);
        assert!(!invoice.payment_paths().is_empty());
@@@ -663,12 -655,12 +664,12 @@@ fn creates_and_pays_for_refund_using_tw
        connect_peers(alice, charlie);
  
        let onion_message = alice.onion_messenger.next_onion_message_for_peer(charlie_id).unwrap();
-       charlie.onion_messenger.handle_onion_message(&alice_id, &onion_message);
+       charlie.onion_messenger.handle_onion_message(alice_id, &onion_message);
  
        let onion_message = charlie.onion_messenger.next_onion_message_for_peer(david_id).unwrap();
-       david.onion_messenger.handle_onion_message(&charlie_id, &onion_message);
+       david.onion_messenger.handle_onion_message(charlie_id, &onion_message);
  
 -      let (invoice, _) = extract_invoice(david, &onion_message);
 +      let (invoice, reply_path) = extract_invoice(david, &onion_message);
        assert_eq!(invoice, expected_invoice);
  
        assert_eq!(invoice.amount_msats(), 10_000_000);
@@@ -735,9 -725,9 +736,9 @@@ fn creates_and_pays_for_offer_using_one
        assert_eq!(reply_path.introduction_node(), &IntroductionNode::NodeId(bob_id));
  
        let onion_message = alice.onion_messenger.next_onion_message_for_peer(bob_id).unwrap();
-       bob.onion_messenger.handle_onion_message(&alice_id, &onion_message);
+       bob.onion_messenger.handle_onion_message(alice_id, &onion_message);
  
 -      let (invoice, _) = extract_invoice(bob, &onion_message);
 +      let (invoice, reply_path) = extract_invoice(bob, &onion_message);
        assert_eq!(invoice.amount_msats(), 10_000_000);
        assert_ne!(invoice.signing_pubkey(), alice_id);
        assert!(!invoice.payment_paths().is_empty());
@@@ -789,9 -778,9 +790,9 @@@ fn creates_and_pays_for_refund_using_on
        let expected_invoice = alice.node.request_refund_payment(&refund).unwrap();
  
        let onion_message = alice.onion_messenger.next_onion_message_for_peer(bob_id).unwrap();
-       bob.onion_messenger.handle_onion_message(&alice_id, &onion_message);
+       bob.onion_messenger.handle_onion_message(alice_id, &onion_message);
  
 -      let (invoice, _) = extract_invoice(bob, &onion_message);
 +      let (invoice, reply_path) = extract_invoice(bob, &onion_message);
        assert_eq!(invoice, expected_invoice);
  
        assert_eq!(invoice.amount_msats(), 10_000_000);
@@@ -1201,9 -1189,9 +1202,9 @@@ fn creates_offer_with_blinded_path_usin
        assert_eq!(reply_path.introduction_node(), &IntroductionNode::NodeId(alice_id));
  
        let onion_message = alice.onion_messenger.next_onion_message_for_peer(bob_id).unwrap();
-       bob.onion_messenger.handle_onion_message(&alice_id, &onion_message);
+       bob.onion_messenger.handle_onion_message(alice_id, &onion_message);
  
 -      let (invoice, _) = extract_invoice(bob, &onion_message);
 +      let (invoice, reply_path) = extract_invoice(bob, &onion_message);
        assert_ne!(invoice.signing_pubkey(), alice_id);
        assert!(!invoice.payment_paths().is_empty());
        for path in invoice.payment_paths() {