@@ -8139,7 +8139,7 @@ fn test_preimage_storage() {
8139
8139
create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 0 . contents . short_channel_id ;
8140
8140
8141
8141
{
8142
- let ( payment_hash, payment_secret) = nodes[ 1 ] . node . get_payment_secret_preimage ( Some ( 100_000 ) , 1008 , 42 ) ;
8142
+ let ( payment_hash, payment_secret) = nodes[ 1 ] . node . create_inbound_payment ( Some ( 100_000 ) , 1008 , 42 ) ;
8143
8143
8144
8144
let logger = test_utils:: TestLogger :: new ( ) ;
8145
8145
let net_graph_msg_handler = & nodes[ 0 ] . net_graph_msg_handler ;
@@ -8175,22 +8175,22 @@ fn test_secret_timeout() {
8175
8175
8176
8176
create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 0 . contents . short_channel_id ;
8177
8177
8178
- let ( payment_hash, payment_secret_1) = nodes[ 1 ] . node . get_payment_secret_preimage ( Some ( 100_000 ) , 2 , 0 ) ;
8178
+ let ( payment_hash, payment_secret_1) = nodes[ 1 ] . node . create_inbound_payment ( Some ( 100_000 ) , 2 , 0 ) ;
8179
8179
8180
8180
// We should fail to register the same payment hash twice, at least until we've connected two
8181
8181
// blocks.
8182
- if let Err ( APIError :: APIMisuseError { err } ) = nodes[ 1 ] . node . get_payment_secret ( payment_hash, Some ( 100_000 ) , 2 , 0 ) {
8182
+ if let Err ( APIError :: APIMisuseError { err } ) = nodes[ 1 ] . node . create_inbound_payment_for_hash ( payment_hash, Some ( 100_000 ) , 2 , 0 ) {
8183
8183
assert_eq ! ( err, "Duplicate payment hash" ) ;
8184
8184
} else { panic ! ( ) ; }
8185
8185
connect_blocks ( & nodes[ 1 ] , 1 ) ;
8186
- if let Err ( APIError :: APIMisuseError { err } ) = nodes[ 1 ] . node . get_payment_secret ( payment_hash, Some ( 100_000 ) , 2 , 0 ) {
8186
+ if let Err ( APIError :: APIMisuseError { err } ) = nodes[ 1 ] . node . create_inbound_payment_for_hash ( payment_hash, Some ( 100_000 ) , 2 , 0 ) {
8187
8187
assert_eq ! ( err, "Duplicate payment hash" ) ;
8188
8188
} else { panic ! ( ) ; }
8189
8189
8190
8190
// If we then connect the second block, we should be able to register the same payment hash
8191
8191
// again with a different user_payment_id (this time getting a new payment secret).
8192
8192
connect_blocks ( & nodes[ 1 ] , 1 ) ;
8193
- let our_payment_secret = nodes[ 1 ] . node . get_payment_secret ( payment_hash, Some ( 100_000 ) , 2 , 42 ) . unwrap ( ) ;
8193
+ let our_payment_secret = nodes[ 1 ] . node . create_inbound_payment_for_hash ( payment_hash, Some ( 100_000 ) , 2 , 42 ) . unwrap ( ) ;
8194
8194
assert_ne ! ( payment_secret_1, our_payment_secret) ;
8195
8195
8196
8196
{
@@ -8232,7 +8232,7 @@ fn test_bad_secret_hash() {
8232
8232
8233
8233
let random_payment_hash = PaymentHash ( [ 42 ; 32 ] ) ;
8234
8234
let random_payment_secret = PaymentSecret ( [ 43 ; 32 ] ) ;
8235
- let ( our_payment_hash, our_payment_secret) = nodes[ 1 ] . node . get_payment_secret_preimage ( Some ( 100_000 ) , 2 , 0 ) ;
8235
+ let ( our_payment_hash, our_payment_secret) = nodes[ 1 ] . node . create_inbound_payment ( Some ( 100_000 ) , 2 , 0 ) ;
8236
8236
8237
8237
let logger = test_utils:: TestLogger :: new ( ) ;
8238
8238
let net_graph_msg_handler = & nodes[ 0 ] . net_graph_msg_handler ;
0 commit comments