Skip to content

Commit

Permalink
Updated offers_tests to use Bolt12CreationError
Browse files Browse the repository at this point in the history
After updating the BOLT12 related ChannelManager methods to
use Bolt12CreationError, the necessary tests in offers_test.rs
were updated as well.
  • Loading branch information
slanesuke committed Jul 21, 2024
1 parent 3b009c2 commit 7b0feda
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lightning/src/ln/offers_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@ fn fails_creating_or_paying_for_offer_without_connected_peers() {
let absolute_expiry = alice.node.duration_since_epoch() + MAX_SHORT_LIVED_RELATIVE_EXPIRY;
match alice.node.create_offer_builder(Some(absolute_expiry)) {
Ok(_) => panic!("Expected error"),
Err(e) => assert_eq!(e, Bolt12SemanticError::MissingPaths),
Err(e) => assert_eq!(e, Bolt12CreationError::InvalidSemantics(Bolt12SemanticError::MissingPaths)),
}

let mut args = ReconnectArgs::new(alice, bob);
Expand Down Expand Up @@ -1348,7 +1348,7 @@ fn fails_creating_refund_or_sending_invoice_without_connected_peers() {

match alice.node.request_refund_payment(&refund) {
Ok(_) => panic!("Expected error"),
Err(e) => assert_eq!(e, Bolt12SemanticError::MissingPaths),
Err(e) => assert_eq!(e, Bolt12CreationError::InvalidSemantics(Bolt12SemanticError::MissingPaths)),
}

let mut args = ReconnectArgs::new(alice, bob);
Expand Down Expand Up @@ -1407,7 +1407,7 @@ fn fails_sending_invoice_with_unsupported_chain_for_refund() {

match alice.node.request_refund_payment(&refund) {
Ok(_) => panic!("Expected error"),
Err(e) => assert_eq!(e, Bolt12SemanticError::UnsupportedChain),
Err(e) => assert_eq!(e, Bolt12CreationError::InvalidSemantics(Bolt12SemanticError::UnsupportedChain)),
}
}

Expand Down Expand Up @@ -1630,7 +1630,7 @@ fn fails_sending_invoice_without_blinded_payment_paths_for_refund() {

match alice.node.request_refund_payment(&refund) {
Ok(_) => panic!("Expected error"),
Err(e) => assert_eq!(e, Bolt12SemanticError::MissingPaths),
Err(e) => assert_eq!(e, Bolt12CreationError::InvalidSemantics(Bolt12SemanticError::MissingPaths)),
}
}

Expand Down

0 comments on commit 7b0feda

Please sign in to comment.