@@ -319,7 +319,7 @@ impl Retry {
319
319
}
320
320
}
321
321
322
- #[ cfg( feature = "std" ) ]
322
+ #[ cfg( not ( feature = "no- std" ) ) ]
323
323
pub ( super ) fn has_expired ( route_params : & RouteParameters ) -> bool {
324
324
if let Some ( expiry_time) = route_params. payment_params . expiry_time {
325
325
if let Ok ( elapsed) = std:: time:: SystemTime :: UNIX_EPOCH . elapsed ( ) {
@@ -894,7 +894,7 @@ impl OutboundPayments {
894
894
IH : Fn ( ) -> InFlightHtlcs ,
895
895
SP : Fn ( SendAlongPathArgs ) -> Result < ( ) , APIError > ,
896
896
{
897
- #[ cfg( feature = "std" ) ] {
897
+ #[ cfg( not ( feature = "no- std" ) ) ] {
898
898
if has_expired ( & route_params) {
899
899
log_error ! ( logger, "Payment with id {} and hash {} had expired before we started paying" ,
900
900
payment_id, payment_hash) ;
@@ -951,7 +951,7 @@ impl OutboundPayments {
951
951
IH : Fn ( ) -> InFlightHtlcs ,
952
952
SP : Fn ( SendAlongPathArgs ) -> Result < ( ) , APIError > ,
953
953
{
954
- #[ cfg( feature = "std" ) ] {
954
+ #[ cfg( not ( feature = "no- std" ) ) ] {
955
955
if has_expired ( & route_params) {
956
956
log_error ! ( logger, "Payment params expired on retry, abandoning payment {}" , & payment_id) ;
957
957
self . abandon_payment ( payment_id, PaymentFailureReason :: PaymentExpired , pending_events) ;
@@ -1830,7 +1830,7 @@ mod tests {
1830
1830
use crate :: ln:: features:: { ChannelFeatures , NodeFeatures } ;
1831
1831
use crate :: ln:: msgs:: { ErrorAction , LightningError } ;
1832
1832
use crate :: ln:: outbound_payment:: { Bolt12PaymentError , OutboundPayments , Retry , RetryableSendFailure , StaleExpiration } ;
1833
- #[ cfg( feature = "std" ) ]
1833
+ #[ cfg( not ( feature = "no- std" ) ) ]
1834
1834
use crate :: offers:: invoice:: DEFAULT_RELATIVE_EXPIRY ;
1835
1835
use crate :: offers:: offer:: OfferBuilder ;
1836
1836
use crate :: offers:: test_utils:: * ;
@@ -1865,12 +1865,12 @@ mod tests {
1865
1865
}
1866
1866
1867
1867
#[ test]
1868
- #[ cfg( feature = "std" ) ]
1868
+ #[ cfg( not ( feature = "no- std" ) ) ]
1869
1869
fn fails_paying_after_expiration ( ) {
1870
1870
do_fails_paying_after_expiration ( false ) ;
1871
1871
do_fails_paying_after_expiration ( true ) ;
1872
1872
}
1873
- #[ cfg( feature = "std" ) ]
1873
+ #[ cfg( not ( feature = "no- std" ) ) ]
1874
1874
fn do_fails_paying_after_expiration ( on_retry : bool ) {
1875
1875
let outbound_payments = OutboundPayments :: new ( ) ;
1876
1876
let logger = test_utils:: TestLogger :: new ( ) ;
@@ -2160,7 +2160,7 @@ mod tests {
2160
2160
assert ! ( pending_events. lock( ) . unwrap( ) . is_empty( ) ) ;
2161
2161
}
2162
2162
2163
- #[ cfg( feature = "std" ) ]
2163
+ #[ cfg( not ( feature = "no- std" ) ) ]
2164
2164
#[ test]
2165
2165
fn fails_sending_payment_for_expired_bolt12_invoice ( ) {
2166
2166
let logger = test_utils:: TestLogger :: new ( ) ;
0 commit comments