Skip to content

Commit 4273677

Browse files
committed
fixup! Add end-to-end test for HRN resolution
1 parent da8a230 commit 4273677

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/payment/unified.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,10 @@ impl UnifiedPayment {
337337
log_error!(self.logger, "Payable methods not found in URI");
338338
Err(Error::PaymentSendingFailed)
339339
}
340+
}
340341

342+
#[cfg(hrn_tests)]
343+
impl UnifiedPayment {
341344
/// Sets a test offer to be used in the `send` method when the `hrn_tests` config flag is enabled.
342345
///
343346
/// This is necessary for Bolt12 payments in HRN tests because we typically resolve offers
@@ -346,7 +349,6 @@ impl UnifiedPayment {
346349
/// offers allow us to bypass this resolution step and test the subsequent payment flow.
347350
///
348351
/// [BIP 353]: https://github.com/bitcoin/bips/blob/master/bip-0353.mediawiki
349-
#[cfg(hrn_tests)]
350352
pub fn set_test_offer(&self, _offer: Offer) {
351353
let _ = self.test_offer.lock().map(|mut guard| *guard = Some(_offer)).map_err(|e| {
352354
log_error!(self.logger, "Failed to set test offer due to poisoned lock: {:?}", e)

0 commit comments

Comments
 (0)