]> git.bitcoin.ninja Git - rust-lightning/commit
Avoid a `short_to_chan_info` read lock in `claim_funds_from_hop`
authorMatt Corallo <git@bluematt.me>
Sat, 21 Sep 2024 04:23:09 +0000 (04:23 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 5 Nov 2024 20:13:48 +0000 (20:13 +0000)
commitb423a33bc7e90234b5b9b45a960c59d1d0d2fdc7
treea9959ef13f1752c56d87689c523de3691a70af09
parent9f9d448efbd0bbcefc2acb1a9d56f1c9bdd96289
Avoid a `short_to_chan_info` read lock in `claim_funds_from_hop`

In 453ed11f80b40f28b6e95a74b1f7ed2cd7f012ad we started tracking the
counterparty's `node_id` in `HTLCPreviousHopData`, however we were
still trying to look it up using `prev_short_channel_id` in
`claim_funds_from_hop`.

Because we now usually have the counterparty's `node_id` directly
accessible, we should skip the `prev_short_channel_id` lookup.

This will also be more important in the next commit where we need
to look up state for our counterparty to generate
`ChannelMonitorUpdate`s whether we have a live channel or not.
lightning/src/ln/channelmanager.rs