]> git.bitcoin.ninja Git - rust-lightning/commit
Make ignoring duplicates `PackageTemplate` claims more robust
authorMatt Corallo <git@bluematt.me>
Sat, 7 Sep 2024 13:26:36 +0000 (13:26 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 18 Sep 2024 16:48:42 +0000 (16:48 +0000)
commiteec6ca9887d0359cc9e3fe45dbc430793efa2336
tree706a9b81dbd3372788603e54efe86b586c5cb51e
parent09bab0ec61a04e53cf27e102b36fecd6b2cace7a
Make ignoring duplicates `PackageTemplate` claims more robust

`update_claims_view_from_requests` assumes that any
`PackageTemplate`s passed to it will not be aggregated (i.e. have
only one input) and uses that assumption when skipping duplicates.

This is currently true, but dropping `PackateTemplate` claims
entirely based on only the first input is somewhat brittle so we
add a debug assertion here and update the logic to not spuriously
drop claims if they happen to come into the `OnChainTxHandler`
pre-aggregated.
lightning/src/chain/onchaintx.rs