]> git.bitcoin.ninja Git - rust-lightning/commit
Move monitor<>outbound_payments startup htlc syncing code.
authorValentine Wallace <vwallace@protonmail.com>
Mon, 16 Sep 2024 16:11:59 +0000 (12:11 -0400)
committerValentine Wallace <vwallace@protonmail.com>
Mon, 16 Sep 2024 17:34:03 +0000 (13:34 -0400)
commit3c2da4147cf485a66317d455791c09d142579d31
tree3ffa6e5b36020c11de4f709171fd937f35eeef01
parent8c356d865819910bcde314b60837806a1bf69a56
Move monitor<>outbound_payments startup htlc syncing code.

Move the code that ensures that HTLCs locked into ChannelMonitors are
synchronized with the ChannelManager's OutboundPayments store to the
outbound_payments module.

This is useful both because ChannelManager::read is very long/confusing method,
so it's nice to encapsulate some of its functionality, and because we need to
fix an existing bug in this logic where we may risk double-paying an offer due
to outbound_payments being stale on startup. See the next commit for this
bugfix.
lightning/src/ln/channelmanager.rs
lightning/src/ln/outbound_payment.rs