]> 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>
Wed, 9 Oct 2024 15:19:21 +0000 (15:19 +0000)
commitccd292e1ead385825b6ce0c25fc30ac778a0d555
tree826b0f8b2af21e99e72052f205d67bcb642b7630
parent885d4c968edbaf75d94dd75abc5521356ca8ae27
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