@@ -82,7 +82,6 @@ pub(crate) enum PendingOutboundPayment {
8282 payment_hash : PaymentHash ,
8383 keysend_preimage : PaymentPreimage ,
8484 retry_strategy : Retry ,
85- payment_release_secret : [ u8 ; 32 ] ,
8685 route_params : RouteParameters ,
8786 } ,
8887 Retryable {
@@ -984,7 +983,7 @@ impl OutboundPayments {
984983 & self , invoice : & StaticInvoice , payment_id : PaymentId , features : Bolt12InvoiceFeatures ,
985984 best_block_height : u32 , entropy_source : ES ,
986985 pending_events : & Mutex < VecDeque < ( events:: Event , Option < EventCompletionAction > ) > >
987- ) -> Result < [ u8 ; 32 ] , Bolt12PaymentError > where ES :: Target : EntropySource {
986+ ) -> Result < ( ) , Bolt12PaymentError > where ES :: Target : EntropySource {
988987 macro_rules! abandon_with_entry {
989988 ( $payment: expr, $reason: expr) => {
990989 $payment. get_mut( ) . mark_abandoned( $reason) ;
@@ -1029,7 +1028,6 @@ impl OutboundPayments {
10291028 } ;
10301029 let keysend_preimage = PaymentPreimage ( entropy_source. get_secure_random_bytes ( ) ) ;
10311030 let payment_hash = PaymentHash ( Sha256 :: hash ( & keysend_preimage. 0 ) . to_byte_array ( ) ) ;
1032- let payment_release_secret = entropy_source. get_secure_random_bytes ( ) ;
10331031 let pay_params = PaymentParameters :: from_static_invoice ( invoice) ;
10341032 let mut route_params = RouteParameters :: from_payment_params_and_value ( pay_params, amount_msat) ;
10351033 route_params. max_total_routing_fee_msat = * max_total_routing_fee_msat;
@@ -1046,10 +1044,9 @@ impl OutboundPayments {
10461044 payment_hash,
10471045 keysend_preimage,
10481046 retry_strategy : * retry_strategy,
1049- payment_release_secret,
10501047 route_params,
10511048 } ;
1052- return Ok ( payment_release_secret )
1049+ return Ok ( ( ) )
10531050 } ,
10541051 _ => return Err ( Bolt12PaymentError :: DuplicateInvoice ) ,
10551052 } ,
@@ -1061,9 +1058,9 @@ impl OutboundPayments {
10611058 pub ( super ) fn send_payment_for_static_invoice <
10621059 R : Deref , ES : Deref , NS : Deref , NL : Deref , IH , SP , L : Deref
10631060 > (
1064- & self , payment_id : PaymentId , payment_release_secret : [ u8 ; 32 ] , router : & R ,
1065- first_hops : Vec < ChannelDetails > , inflight_htlcs : IH , entropy_source : & ES , node_signer : & NS ,
1066- node_id_lookup : & NL , secp_ctx : & Secp256k1 < secp256k1:: All > , best_block_height : u32 , logger : & L ,
1061+ & self , payment_id : PaymentId , router : & R , first_hops : Vec < ChannelDetails > , inflight_htlcs : IH ,
1062+ entropy_source : & ES , node_signer : & NS , node_id_lookup : & NL ,
1063+ secp_ctx : & Secp256k1 < secp256k1:: All > , best_block_height : u32 , logger : & L ,
10671064 pending_events : & Mutex < VecDeque < ( events:: Event , Option < EventCompletionAction > ) > > ,
10681065 send_payment_along_path : SP ,
10691066 ) -> Result < ( ) , Bolt12PaymentError >
@@ -1080,12 +1077,8 @@ impl OutboundPayments {
10801077 match self . pending_outbound_payments . lock ( ) . unwrap ( ) . entry ( payment_id) {
10811078 hash_map:: Entry :: Occupied ( entry) => match entry. get ( ) {
10821079 PendingOutboundPayment :: StaticInvoiceReceived {
1083- payment_hash, payment_release_secret : release_secret, route_params, retry_strategy,
1084- keysend_preimage, ..
1080+ payment_hash, route_params, retry_strategy, keysend_preimage, ..
10851081 } => {
1086- if payment_release_secret != * release_secret {
1087- return Err ( Bolt12PaymentError :: UnexpectedInvoice )
1088- }
10891082 ( * payment_hash, * keysend_preimage, route_params. clone ( ) , * retry_strategy)
10901083 } ,
10911084 _ => return Err ( Bolt12PaymentError :: DuplicateInvoice ) ,
@@ -2196,8 +2189,7 @@ impl_writeable_tlv_based_enum_upgradable!(PendingOutboundPayment,
21962189 ( 0 , payment_hash, required) ,
21972190 ( 2 , keysend_preimage, required) ,
21982191 ( 4 , retry_strategy, required) ,
2199- ( 6 , payment_release_secret, required) ,
2200- ( 8 , route_params, required) ,
2192+ ( 6 , route_params, required) ,
22012193 } ,
22022194) ;
22032195
@@ -2785,7 +2777,6 @@ mod tests {
27852777 payment_hash,
27862778 keysend_preimage : PaymentPreimage ( [ 0 ; 32 ] ) ,
27872779 retry_strategy : Retry :: Attempts ( 0 ) ,
2788- payment_release_secret : [ 0 ; 32 ] ,
27892780 route_params,
27902781 } ;
27912782 outbounds. insert ( payment_id, outbound) ;
@@ -2832,7 +2823,6 @@ mod tests {
28322823 payment_hash,
28332824 keysend_preimage : PaymentPreimage ( [ 0 ; 32 ] ) ,
28342825 retry_strategy : Retry :: Attempts ( 0 ) ,
2835- payment_release_secret : [ 0 ; 32 ] ,
28362826 route_params,
28372827 } ;
28382828 outbounds. insert ( payment_id, outbound) ;
0 commit comments