@@ -8138,7 +8138,7 @@ fn test_preimage_storage() {
81388138 create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 0 . contents . short_channel_id ;
81398139
81408140 {
8141- let ( payment_hash, payment_secret) = nodes[ 1 ] . node . get_payment_secret_preimage ( Some ( 100_000 ) , 1008 , 42 ) ;
8141+ let ( payment_hash, payment_secret) = nodes[ 1 ] . node . create_inbound_payment ( Some ( 100_000 ) , 1008 , 42 ) ;
81428142
81438143 let logger = test_utils:: TestLogger :: new ( ) ;
81448144 let net_graph_msg_handler = & nodes[ 0 ] . net_graph_msg_handler ;
@@ -8174,22 +8174,22 @@ fn test_secret_timeout() {
81748174
81758175 create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 0 . contents . short_channel_id ;
81768176
8177- let ( payment_hash, payment_secret_1) = nodes[ 1 ] . node . get_payment_secret_preimage ( Some ( 100_000 ) , 2 , 0 ) ;
8177+ let ( payment_hash, payment_secret_1) = nodes[ 1 ] . node . create_inbound_payment ( Some ( 100_000 ) , 2 , 0 ) ;
81788178
81798179 // We should fail to register the same payment hash twice, at least until we've connected two
81808180 // blocks.
8181- if let Err ( APIError :: APIMisuseError { err } ) = nodes[ 1 ] . node . get_payment_secret ( payment_hash, Some ( 100_000 ) , 2 , 0 ) {
8181+ if let Err ( APIError :: APIMisuseError { err } ) = nodes[ 1 ] . node . create_inbound_payment_for_hash ( payment_hash, Some ( 100_000 ) , 2 , 0 ) {
81828182 assert_eq ! ( err, "Duplicate payment hash" ) ;
81838183 } else { panic ! ( ) ; }
81848184 connect_blocks ( & nodes[ 1 ] , 1 ) ;
8185- if let Err ( APIError :: APIMisuseError { err } ) = nodes[ 1 ] . node . get_payment_secret ( payment_hash, Some ( 100_000 ) , 2 , 0 ) {
8185+ if let Err ( APIError :: APIMisuseError { err } ) = nodes[ 1 ] . node . create_inbound_payment_for_hash ( payment_hash, Some ( 100_000 ) , 2 , 0 ) {
81868186 assert_eq ! ( err, "Duplicate payment hash" ) ;
81878187 } else { panic ! ( ) ; }
81888188
81898189 // If we then connect the second block, we should be able to register the same payment hash
81908190 // again with a different user_payment_id (this time getting a new payment secret).
81918191 connect_blocks ( & nodes[ 1 ] , 1 ) ;
8192- let our_payment_secret = nodes[ 1 ] . node . get_payment_secret ( payment_hash, Some ( 100_000 ) , 2 , 42 ) . unwrap ( ) ;
8192+ let our_payment_secret = nodes[ 1 ] . node . create_inbound_payment_for_hash ( payment_hash, Some ( 100_000 ) , 2 , 42 ) . unwrap ( ) ;
81938193 assert_ne ! ( payment_secret_1, our_payment_secret) ;
81948194
81958195 {
@@ -8231,7 +8231,7 @@ fn test_bad_secret_hash() {
82318231
82328232 let random_payment_hash = PaymentHash ( [ 42 ; 32 ] ) ;
82338233 let random_payment_secret = PaymentSecret ( [ 43 ; 32 ] ) ;
8234- let ( our_payment_hash, our_payment_secret) = nodes[ 1 ] . node . get_payment_secret_preimage ( Some ( 100_000 ) , 2 , 0 ) ;
8234+ let ( our_payment_hash, our_payment_secret) = nodes[ 1 ] . node . create_inbound_payment ( Some ( 100_000 ) , 2 , 0 ) ;
82358235
82368236 let logger = test_utils:: TestLogger :: new ( ) ;
82378237 let net_graph_msg_handler = & nodes[ 0 ] . net_graph_msg_handler ;
0 commit comments