]> git.bitcoin.ninja Git - rust-lightning/commit
Remove the `PaymentSecret` field from `HTLCSource::OutboundRoute`
authorMatt Corallo <git@bluematt.me>
Wed, 22 Mar 2023 19:15:52 +0000 (19:15 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 5 Apr 2023 16:28:14 +0000 (16:28 +0000)
commit2f798f6cc0099a10f2f8e4a3ea0f3fab6d51a612
tree6ed9a943d54742d541b46c2eeae42d7d2dbad498
parent3b8bf93251a9c8aa528c6961d572a611bc140eb5
Remove the `PaymentSecret` field from `HTLCSource::OutboundRoute`

Many of the fields in `HTLCSource::OutboundRoute` are used to
rebuild the pending-outbound-payment map on reload if the
`ChannelManager` was not serialized though `ChannelMonitor`(s)
were after an HTLC was sent. As of 0.0.114, however, such payments
are not retryable without allowing them to fail and doing a full,
fresh, send.

Thus, some of the fields can be safely removed - we only really
care about having enough information to provide the user a failure
event, not being able to retry.

Here we drop one such field - the `payment_secret`, making our
`ChannelMonitorUpdate`s another handful of bytes smaller.
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
pending_changelog/matt-rm-retryable-secret.txt [new file with mode: 0644]