File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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)
You can’t perform that action at this time.
0 commit comments