Skip to content

Commit 800c3f5

Browse files
committed
Remove unused argument from handle_error!
1 parent 301f91e commit 800c3f5

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/ln/channelmanager.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ pub struct ChannelDetails {
381381
}
382382

383383
macro_rules! handle_error {
384-
($self: ident, $internal: expr, $their_node_id: expr) => {
384+
($self: ident, $internal: expr) => {
385385
match $internal {
386386
Ok(msg) => Ok(msg),
387387
Err(MsgHandleErrInternal { err, shutdown_finish }) => {
@@ -1044,7 +1044,7 @@ impl ChannelManager {
10441044
return Ok(());
10451045
};
10461046

1047-
match handle_error!(self, err, route.hops.first().unwrap().pubkey) {
1047+
match handle_error!(self, err) {
10481048
Ok(_) => unreachable!(),
10491049
Err(e) => {
10501050
if let Some(msgs::ErrorAction::IgnoreError) = e.action {
@@ -1087,7 +1087,7 @@ impl ChannelManager {
10871087
None => return
10881088
}
10891089
};
1090-
match handle_error!(self, res, chan.get_their_node_id()) {
1090+
match handle_error!(self, res) {
10911091
Ok(funding_msg) => {
10921092
(chan, funding_msg.0, funding_msg.1)
10931093
},
@@ -2243,7 +2243,7 @@ impl ChannelManager {
22432243
return Ok(())
22442244
};
22452245

2246-
match handle_error!(self, err, their_node_id) {
2246+
match handle_error!(self, err) {
22472247
Ok(_) => unreachable!(),
22482248
Err(e) => {
22492249
if let Some(msgs::ErrorAction::IgnoreError) = e.action {
@@ -2429,82 +2429,82 @@ impl ChannelMessageHandler for ChannelManager {
24292429
//TODO: Handle errors and close channel (or so)
24302430
fn handle_open_channel(&self, their_node_id: &PublicKey, msg: &msgs::OpenChannel) -> Result<(), HandleError> {
24312431
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))
24332433
}
24342434

24352435
fn handle_accept_channel(&self, their_node_id: &PublicKey, msg: &msgs::AcceptChannel) -> Result<(), HandleError> {
24362436
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))
24382438
}
24392439

24402440
fn handle_funding_created(&self, their_node_id: &PublicKey, msg: &msgs::FundingCreated) -> Result<(), HandleError> {
24412441
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))
24432443
}
24442444

24452445
fn handle_funding_signed(&self, their_node_id: &PublicKey, msg: &msgs::FundingSigned) -> Result<(), HandleError> {
24462446
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))
24482448
}
24492449

24502450
fn handle_funding_locked(&self, their_node_id: &PublicKey, msg: &msgs::FundingLocked) -> Result<(), HandleError> {
24512451
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))
24532453
}
24542454

24552455
fn handle_shutdown(&self, their_node_id: &PublicKey, msg: &msgs::Shutdown) -> Result<(), HandleError> {
24562456
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))
24582458
}
24592459

24602460
fn handle_closing_signed(&self, their_node_id: &PublicKey, msg: &msgs::ClosingSigned) -> Result<(), HandleError> {
24612461
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))
24632463
}
24642464

24652465
fn handle_update_add_htlc(&self, their_node_id: &PublicKey, msg: &msgs::UpdateAddHTLC) -> Result<(), msgs::HandleError> {
24662466
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))
24682468
}
24692469

24702470
fn handle_update_fulfill_htlc(&self, their_node_id: &PublicKey, msg: &msgs::UpdateFulfillHTLC) -> Result<(), HandleError> {
24712471
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))
24732473
}
24742474

24752475
fn handle_update_fail_htlc(&self, their_node_id: &PublicKey, msg: &msgs::UpdateFailHTLC) -> Result<(), HandleError> {
24762476
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))
24782478
}
24792479

24802480
fn handle_update_fail_malformed_htlc(&self, their_node_id: &PublicKey, msg: &msgs::UpdateFailMalformedHTLC) -> Result<(), HandleError> {
24812481
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))
24832483
}
24842484

24852485
fn handle_commitment_signed(&self, their_node_id: &PublicKey, msg: &msgs::CommitmentSigned) -> Result<(), HandleError> {
24862486
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))
24882488
}
24892489

24902490
fn handle_revoke_and_ack(&self, their_node_id: &PublicKey, msg: &msgs::RevokeAndACK) -> Result<(), HandleError> {
24912491
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))
24932493
}
24942494

24952495
fn handle_update_fee(&self, their_node_id: &PublicKey, msg: &msgs::UpdateFee) -> Result<(), HandleError> {
24962496
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))
24982498
}
24992499

25002500
fn handle_announcement_signatures(&self, their_node_id: &PublicKey, msg: &msgs::AnnouncementSignatures) -> Result<(), HandleError> {
25012501
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))
25032503
}
25042504

25052505
fn handle_channel_reestablish(&self, their_node_id: &PublicKey, msg: &msgs::ChannelReestablish) -> Result<(), HandleError> {
25062506
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))
25082508
}
25092509

25102510
fn peer_disconnected(&self, their_node_id: &PublicKey, no_connection_possible: bool) {

0 commit comments

Comments
 (0)