Merge pull request #3017 from jkczyz/2024-04-optional-pubkey
[rust-lightning] / lightning / src / ln / offers_tests.rs
index c480cf5b8a83bc0070646ecfa083839b3f1bf9b2..42953ad1cd0a60160e2376c32b6c394f1a463018 100644 (file)
@@ -270,7 +270,7 @@ fn prefers_non_tor_nodes_in_blinded_paths() {
                .create_offer_builder("coffee".to_string()).unwrap()
                .amount_msats(10_000_000)
                .build().unwrap();
-       assert_ne!(offer.signing_pubkey(), bob_id);
+       assert_ne!(offer.signing_pubkey(), Some(bob_id));
        assert!(!offer.paths().is_empty());
        for path in offer.paths() {
                assert_ne!(path.introduction_node, IntroductionNode::NodeId(bob_id));
@@ -285,7 +285,7 @@ fn prefers_non_tor_nodes_in_blinded_paths() {
                .create_offer_builder("coffee".to_string()).unwrap()
                .amount_msats(10_000_000)
                .build().unwrap();
-       assert_ne!(offer.signing_pubkey(), bob_id);
+       assert_ne!(offer.signing_pubkey(), Some(bob_id));
        assert!(!offer.paths().is_empty());
        for path in offer.paths() {
                assert_eq!(path.introduction_node, IntroductionNode::NodeId(bob_id));
@@ -335,7 +335,7 @@ fn prefers_more_connected_nodes_in_blinded_paths() {
                .create_offer_builder("coffee".to_string()).unwrap()
                .amount_msats(10_000_000)
                .build().unwrap();
-       assert_ne!(offer.signing_pubkey(), bob_id);
+       assert_ne!(offer.signing_pubkey(), Some(bob_id));
        assert!(!offer.paths().is_empty());
        for path in offer.paths() {
                assert_eq!(path.introduction_node, IntroductionNode::NodeId(nodes[4].node.get_our_node_id()));
@@ -385,7 +385,7 @@ fn creates_and_pays_for_offer_using_two_hop_blinded_path() {
                .unwrap()
                .amount_msats(10_000_000)
                .build().unwrap();
-       assert_ne!(offer.signing_pubkey(), alice_id);
+       assert_ne!(offer.signing_pubkey(), Some(alice_id));
        assert!(!offer.paths().is_empty());
        for path in offer.paths() {
                assert_eq!(path.introduction_node, IntroductionNode::NodeId(bob_id));
@@ -544,7 +544,7 @@ fn creates_and_pays_for_offer_using_one_hop_blinded_path() {
                .create_offer_builder("coffee".to_string()).unwrap()
                .amount_msats(10_000_000)
                .build().unwrap();
-       assert_ne!(offer.signing_pubkey(), alice_id);
+       assert_ne!(offer.signing_pubkey(), Some(alice_id));
        assert!(!offer.paths().is_empty());
        for path in offer.paths() {
                assert_eq!(path.introduction_node, IntroductionNode::NodeId(alice_id));
@@ -667,7 +667,7 @@ fn pays_for_offer_without_blinded_paths() {
                .clear_paths()
                .amount_msats(10_000_000)
                .build().unwrap();
-       assert_eq!(offer.signing_pubkey(), alice_id);
+       assert_eq!(offer.signing_pubkey(), Some(alice_id));
        assert!(offer.paths().is_empty());
 
        let payment_id = PaymentId([1; 32]);