Optional OfferContents::signing_pubkey
[rust-lightning] / lightning / src / ln / offers_tests.rs
index 75a2e290f39e824514fdaa3b6333eb20b319663e..e89e113e8ea887e37373c39f4b6e9f8a28754342 100644 (file)
@@ -271,7 +271,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));
@@ -286,7 +286,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));
@@ -336,7 +336,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()));
@@ -386,7 +386,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));
@@ -547,7 +547,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));
@@ -672,7 +672,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]);