@@ -8138,7 +8138,7 @@ fn test_preimage_storage() {
8138
8138
create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 0 . contents . short_channel_id ;
8139
8139
8140
8140
{
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 ) ;
8142
8142
8143
8143
let logger = test_utils:: TestLogger :: new ( ) ;
8144
8144
let net_graph_msg_handler = & nodes[ 0 ] . net_graph_msg_handler ;
@@ -8174,22 +8174,22 @@ fn test_secret_timeout() {
8174
8174
8175
8175
create_announced_chan_between_nodes ( & nodes, 0 , 1 , InitFeatures :: known ( ) , InitFeatures :: known ( ) ) . 0 . contents . short_channel_id ;
8176
8176
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 ) ;
8178
8178
8179
8179
// We should fail to register the same payment hash twice, at least until we've connected two
8180
8180
// 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 ) {
8182
8182
assert_eq ! ( err, "Duplicate payment hash" ) ;
8183
8183
} else { panic ! ( ) ; }
8184
8184
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 ) {
8186
8186
assert_eq ! ( err, "Duplicate payment hash" ) ;
8187
8187
} else { panic ! ( ) ; }
8188
8188
8189
8189
// If we then connect the second block, we should be able to register the same payment hash
8190
8190
// again with a different user_payment_id (this time getting a new payment secret).
8191
8191
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 ( ) ;
8193
8193
assert_ne ! ( payment_secret_1, our_payment_secret) ;
8194
8194
8195
8195
{
@@ -8231,7 +8231,7 @@ fn test_bad_secret_hash() {
8231
8231
8232
8232
let random_payment_hash = PaymentHash ( [ 42 ; 32 ] ) ;
8233
8233
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 ) ;
8235
8235
8236
8236
let logger = test_utils:: TestLogger :: new ( ) ;
8237
8237
let net_graph_msg_handler = & nodes[ 0 ] . net_graph_msg_handler ;
0 commit comments