@@ -381,7 +381,7 @@ pub struct ChannelDetails {
381
381
}
382
382
383
383
macro_rules! handle_error {
384
- ( $self: ident, $internal: expr, $their_node_id : expr ) => {
384
+ ( $self: ident, $internal: expr) => {
385
385
match $internal {
386
386
Ok ( msg) => Ok ( msg) ,
387
387
Err ( MsgHandleErrInternal { err, shutdown_finish } ) => {
@@ -1044,7 +1044,7 @@ impl ChannelManager {
1044
1044
return Ok ( ( ) ) ;
1045
1045
} ;
1046
1046
1047
- match handle_error ! ( self , err, route . hops . first ( ) . unwrap ( ) . pubkey ) {
1047
+ match handle_error ! ( self , err) {
1048
1048
Ok ( _) => unreachable ! ( ) ,
1049
1049
Err ( e) => {
1050
1050
if let Some ( msgs:: ErrorAction :: IgnoreError ) = e. action {
@@ -1087,7 +1087,7 @@ impl ChannelManager {
1087
1087
None => return
1088
1088
}
1089
1089
} ;
1090
- match handle_error ! ( self , res, chan . get_their_node_id ( ) ) {
1090
+ match handle_error ! ( self , res) {
1091
1091
Ok ( funding_msg) => {
1092
1092
( chan, funding_msg. 0 , funding_msg. 1 )
1093
1093
} ,
@@ -2243,7 +2243,7 @@ impl ChannelManager {
2243
2243
return Ok ( ( ) )
2244
2244
} ;
2245
2245
2246
- match handle_error ! ( self , err, their_node_id ) {
2246
+ match handle_error ! ( self , err) {
2247
2247
Ok ( _) => unreachable ! ( ) ,
2248
2248
Err ( e) => {
2249
2249
if let Some ( msgs:: ErrorAction :: IgnoreError ) = e. action {
@@ -2429,82 +2429,82 @@ impl ChannelMessageHandler for ChannelManager {
2429
2429
//TODO: Handle errors and close channel (or so)
2430
2430
fn handle_open_channel ( & self , their_node_id : & PublicKey , msg : & msgs:: OpenChannel ) -> Result < ( ) , HandleError > {
2431
2431
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2432
- handle_error ! ( self , self . internal_open_channel( their_node_id, msg) , their_node_id )
2432
+ handle_error ! ( self , self . internal_open_channel( their_node_id, msg) )
2433
2433
}
2434
2434
2435
2435
fn handle_accept_channel ( & self , their_node_id : & PublicKey , msg : & msgs:: AcceptChannel ) -> Result < ( ) , HandleError > {
2436
2436
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2437
- handle_error ! ( self , self . internal_accept_channel( their_node_id, msg) , their_node_id )
2437
+ handle_error ! ( self , self . internal_accept_channel( their_node_id, msg) )
2438
2438
}
2439
2439
2440
2440
fn handle_funding_created ( & self , their_node_id : & PublicKey , msg : & msgs:: FundingCreated ) -> Result < ( ) , HandleError > {
2441
2441
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2442
- handle_error ! ( self , self . internal_funding_created( their_node_id, msg) , their_node_id )
2442
+ handle_error ! ( self , self . internal_funding_created( their_node_id, msg) )
2443
2443
}
2444
2444
2445
2445
fn handle_funding_signed ( & self , their_node_id : & PublicKey , msg : & msgs:: FundingSigned ) -> Result < ( ) , HandleError > {
2446
2446
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2447
- handle_error ! ( self , self . internal_funding_signed( their_node_id, msg) , their_node_id )
2447
+ handle_error ! ( self , self . internal_funding_signed( their_node_id, msg) )
2448
2448
}
2449
2449
2450
2450
fn handle_funding_locked ( & self , their_node_id : & PublicKey , msg : & msgs:: FundingLocked ) -> Result < ( ) , HandleError > {
2451
2451
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2452
- handle_error ! ( self , self . internal_funding_locked( their_node_id, msg) , their_node_id )
2452
+ handle_error ! ( self , self . internal_funding_locked( their_node_id, msg) )
2453
2453
}
2454
2454
2455
2455
fn handle_shutdown ( & self , their_node_id : & PublicKey , msg : & msgs:: Shutdown ) -> Result < ( ) , HandleError > {
2456
2456
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2457
- handle_error ! ( self , self . internal_shutdown( their_node_id, msg) , their_node_id )
2457
+ handle_error ! ( self , self . internal_shutdown( their_node_id, msg) )
2458
2458
}
2459
2459
2460
2460
fn handle_closing_signed ( & self , their_node_id : & PublicKey , msg : & msgs:: ClosingSigned ) -> Result < ( ) , HandleError > {
2461
2461
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2462
- handle_error ! ( self , self . internal_closing_signed( their_node_id, msg) , their_node_id )
2462
+ handle_error ! ( self , self . internal_closing_signed( their_node_id, msg) )
2463
2463
}
2464
2464
2465
2465
fn handle_update_add_htlc ( & self , their_node_id : & PublicKey , msg : & msgs:: UpdateAddHTLC ) -> Result < ( ) , msgs:: HandleError > {
2466
2466
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2467
- handle_error ! ( self , self . internal_update_add_htlc( their_node_id, msg) , their_node_id )
2467
+ handle_error ! ( self , self . internal_update_add_htlc( their_node_id, msg) )
2468
2468
}
2469
2469
2470
2470
fn handle_update_fulfill_htlc ( & self , their_node_id : & PublicKey , msg : & msgs:: UpdateFulfillHTLC ) -> Result < ( ) , HandleError > {
2471
2471
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2472
- handle_error ! ( self , self . internal_update_fulfill_htlc( their_node_id, msg) , their_node_id )
2472
+ handle_error ! ( self , self . internal_update_fulfill_htlc( their_node_id, msg) )
2473
2473
}
2474
2474
2475
2475
fn handle_update_fail_htlc ( & self , their_node_id : & PublicKey , msg : & msgs:: UpdateFailHTLC ) -> Result < ( ) , HandleError > {
2476
2476
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2477
- handle_error ! ( self , self . internal_update_fail_htlc( their_node_id, msg) , their_node_id )
2477
+ handle_error ! ( self , self . internal_update_fail_htlc( their_node_id, msg) )
2478
2478
}
2479
2479
2480
2480
fn handle_update_fail_malformed_htlc ( & self , their_node_id : & PublicKey , msg : & msgs:: UpdateFailMalformedHTLC ) -> Result < ( ) , HandleError > {
2481
2481
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2482
- handle_error ! ( self , self . internal_update_fail_malformed_htlc( their_node_id, msg) , their_node_id )
2482
+ handle_error ! ( self , self . internal_update_fail_malformed_htlc( their_node_id, msg) )
2483
2483
}
2484
2484
2485
2485
fn handle_commitment_signed ( & self , their_node_id : & PublicKey , msg : & msgs:: CommitmentSigned ) -> Result < ( ) , HandleError > {
2486
2486
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2487
- handle_error ! ( self , self . internal_commitment_signed( their_node_id, msg) , their_node_id )
2487
+ handle_error ! ( self , self . internal_commitment_signed( their_node_id, msg) )
2488
2488
}
2489
2489
2490
2490
fn handle_revoke_and_ack ( & self , their_node_id : & PublicKey , msg : & msgs:: RevokeAndACK ) -> Result < ( ) , HandleError > {
2491
2491
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2492
- handle_error ! ( self , self . internal_revoke_and_ack( their_node_id, msg) , their_node_id )
2492
+ handle_error ! ( self , self . internal_revoke_and_ack( their_node_id, msg) )
2493
2493
}
2494
2494
2495
2495
fn handle_update_fee ( & self , their_node_id : & PublicKey , msg : & msgs:: UpdateFee ) -> Result < ( ) , HandleError > {
2496
2496
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2497
- handle_error ! ( self , self . internal_update_fee( their_node_id, msg) , their_node_id )
2497
+ handle_error ! ( self , self . internal_update_fee( their_node_id, msg) )
2498
2498
}
2499
2499
2500
2500
fn handle_announcement_signatures ( & self , their_node_id : & PublicKey , msg : & msgs:: AnnouncementSignatures ) -> Result < ( ) , HandleError > {
2501
2501
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2502
- handle_error ! ( self , self . internal_announcement_signatures( their_node_id, msg) , their_node_id )
2502
+ handle_error ! ( self , self . internal_announcement_signatures( their_node_id, msg) )
2503
2503
}
2504
2504
2505
2505
fn handle_channel_reestablish ( & self , their_node_id : & PublicKey , msg : & msgs:: ChannelReestablish ) -> Result < ( ) , HandleError > {
2506
2506
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2507
- handle_error ! ( self , self . internal_channel_reestablish( their_node_id, msg) , their_node_id )
2507
+ handle_error ! ( self , self . internal_channel_reestablish( their_node_id, msg) )
2508
2508
}
2509
2509
2510
2510
fn peer_disconnected ( & self , their_node_id : & PublicKey , no_connection_possible : bool ) {
0 commit comments