Skip to content

Commit

Permalink
Resolve node_id for functions with msg handler
Browse files Browse the repository at this point in the history
Deref counterparty_node_id
  • Loading branch information
jurvis committed Apr 20, 2022
1 parent 3839ade commit bb6d9bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lightning/src/ln/channelmanager.rs
Expand Up @@ -2061,7 +2061,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
};

for htlc_source in failed_htlcs.drain(..) {
self.fail_htlc_backwards_internal(self.channel_state.lock().unwrap(), htlc_source.0, &htlc_source.1, HTLCFailReason::Reason { failure_code: 0x4000 | 8, data: Vec::new() }, self.get_our_node_id());
self.fail_htlc_backwards_internal(self.channel_state.lock().unwrap(), htlc_source.0, &htlc_source.1, HTLCFailReason::Reason { failure_code: 0x4000 | 8, data: Vec::new() }, counterparty_node_id);
}

let _ = handle_error!(self, result, counterparty_node_id);
Expand Down Expand Up @@ -4641,7 +4641,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
}
};
for htlc_source in dropped_htlcs.drain(..) {
self.fail_htlc_backwards_internal(self.channel_state.lock().unwrap(), htlc_source.0, &htlc_source.1, HTLCFailReason::Reason { failure_code: 0x4000 | 8, data: Vec::new() }, self.get_our_node_id());
self.fail_htlc_backwards_internal(self.channel_state.lock().unwrap(), htlc_source.0, &htlc_source.1, HTLCFailReason::Reason { failure_code: 0x4000 | 8, data: Vec::new() }, counterparty_node_id.clone());
}

let _ = handle_error!(self, result, *counterparty_node_id);
Expand Down Expand Up @@ -4927,7 +4927,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
short_channel_id, channel_outpoint)) =>
{
for failure in pending_failures.drain(..) {
self.fail_htlc_backwards_internal(self.channel_state.lock().unwrap(), failure.0, &failure.1, failure.2, self.get_our_node_id());
self.fail_htlc_backwards_internal(self.channel_state.lock().unwrap(), failure.0, &failure.1, failure.2, *counterparty_node_id);
}
self.forward_htlcs(&mut [(short_channel_id, channel_outpoint, pending_forwards)]);
self.finalize_claims(finalized_claim_htlcs);
Expand Down

0 comments on commit bb6d9bd

Please sign in to comment.