Skip to content

Commit 071bbcb

Browse files
committed
f - remove build_with_id from tests
1 parent 2db23ad commit 071bbcb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lightning/src/ln/offers_tests.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -380,12 +380,12 @@ fn creates_and_pays_for_offer_using_two_hop_blinded_path() {
380380
disconnect_peers(alice, &[charlie, david, &nodes[4], &nodes[5]]);
381381
disconnect_peers(david, &[bob, &nodes[4], &nodes[5]]);
382382

383-
let (offer_id, offer) = alice.node
383+
let offer = alice.node
384384
.create_offer_builder("coffee".to_string())
385385
.unwrap()
386386
.amount_msats(10_000_000)
387-
.build_with_id().unwrap();
388-
let payment_context = PaymentContext::Bolt12Offer { offer_id };
387+
.build().unwrap();
388+
let payment_context = PaymentContext::Bolt12Offer { offer_id: offer.id() };
389389
assert_ne!(offer.signing_pubkey(), alice_id);
390390
assert!(!offer.paths().is_empty());
391391
for path in offer.paths() {
@@ -533,11 +533,11 @@ fn creates_and_pays_for_offer_using_one_hop_blinded_path() {
533533
let bob = &nodes[1];
534534
let bob_id = bob.node.get_our_node_id();
535535

536-
let (offer_id, offer) = alice.node
536+
let offer = alice.node
537537
.create_offer_builder("coffee".to_string()).unwrap()
538538
.amount_msats(10_000_000)
539-
.build_with_id().unwrap();
540-
let payment_context = PaymentContext::Bolt12Offer { offer_id };
539+
.build().unwrap();
540+
let payment_context = PaymentContext::Bolt12Offer { offer_id: offer.id() };
541541
assert_ne!(offer.signing_pubkey(), alice_id);
542542
assert!(!offer.paths().is_empty());
543543
for path in offer.paths() {
@@ -648,12 +648,12 @@ fn pays_for_offer_without_blinded_paths() {
648648
let bob = &nodes[1];
649649
let bob_id = bob.node.get_our_node_id();
650650

651-
let (offer_id, offer) = alice.node
651+
let offer = alice.node
652652
.create_offer_builder("coffee".to_string()).unwrap()
653653
.clear_paths()
654654
.amount_msats(10_000_000)
655-
.build_with_id().unwrap();
656-
let payment_context = PaymentContext::Bolt12Offer { offer_id };
655+
.build().unwrap();
656+
let payment_context = PaymentContext::Bolt12Offer { offer_id: offer.id() };
657657
assert_eq!(offer.signing_pubkey(), alice_id);
658658
assert!(offer.paths().is_empty());
659659

0 commit comments

Comments
 (0)