File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ impl LightningNode for ClnNode {
188
188
189
189
async fn track_payment (
190
190
& mut self ,
191
- hash : PaymentHash ,
191
+ hash : & PaymentHash ,
192
192
shutdown : Listener ,
193
193
) -> Result < PaymentResult , LightningError > {
194
194
loop {
Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ pub trait LightningNode: Send {
250
250
/// Track a payment with the specified hash.
251
251
async fn track_payment (
252
252
& mut self ,
253
- hash : PaymentHash ,
253
+ hash : & PaymentHash ,
254
254
shutdown : Listener ,
255
255
) -> Result < PaymentResult , LightningError > ;
256
256
/// Gets information on a specific node
@@ -1214,7 +1214,7 @@ async fn track_payment_result(
1214
1214
let res = match payment. hash {
1215
1215
Some ( hash) => {
1216
1216
log:: debug!( "Tracking payment outcome for: {}." , hex:: encode( hash. 0 ) ) ;
1217
- let track_payment = node. track_payment ( hash, listener. clone ( ) ) ;
1217
+ let track_payment = node. track_payment ( & hash, listener. clone ( ) ) ;
1218
1218
1219
1219
match track_payment. await {
1220
1220
Ok ( res) => {
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ impl LightningNode for LndNode {
175
175
176
176
async fn track_payment (
177
177
& mut self ,
178
- hash : PaymentHash ,
178
+ hash : & PaymentHash ,
179
179
shutdown : Listener ,
180
180
) -> Result < PaymentResult , LightningError > {
181
181
let response = self
Original file line number Diff line number Diff line change @@ -557,10 +557,10 @@ impl<T: SimNetwork> LightningNode for SimNode<'_, T> {
557
557
/// provided is triggered. This call will fail if the hash provided was not obtained by calling send_payment first.
558
558
async fn track_payment (
559
559
& mut self ,
560
- hash : PaymentHash ,
560
+ hash : & PaymentHash ,
561
561
listener : Listener ,
562
562
) -> Result < PaymentResult , LightningError > {
563
- match self . in_flight . remove ( & hash) {
563
+ match self . in_flight . remove ( hash) {
564
564
Some ( receiver) => {
565
565
select ! {
566
566
biased;
@@ -1491,13 +1491,13 @@ mod tests {
1491
1491
let ( _, shutdown_listener) = triggered:: trigger ( ) ;
1492
1492
1493
1493
let result_1 = node
1494
- . track_payment ( hash_1, shutdown_listener. clone ( ) )
1494
+ . track_payment ( & hash_1, shutdown_listener. clone ( ) )
1495
1495
. await
1496
1496
. unwrap ( ) ;
1497
1497
assert ! ( matches!( result_1. payment_outcome, PaymentOutcome :: Success ) ) ;
1498
1498
1499
1499
let result_2 = node
1500
- . track_payment ( hash_2, shutdown_listener. clone ( ) )
1500
+ . track_payment ( & hash_2, shutdown_listener. clone ( ) )
1501
1501
. await
1502
1502
. unwrap ( ) ;
1503
1503
assert ! ( matches!(
You can’t perform that action at this time.
0 commit comments