]> git.bitcoin.ninja Git - rust-lightning/commit
Use ln OutPoints not bitcoin ones in SpendableOutputDescriptors
authorMatt Corallo <git@bluematt.me>
Thu, 30 Jul 2020 17:19:11 +0000 (13:19 -0400)
committerMatt Corallo <git@bluematt.me>
Tue, 25 Aug 2020 21:09:51 +0000 (17:09 -0400)
commit6df9129ace609bfb5c7f08ae0f41175126d05b1b
tree97cabedc88568b02e107ca08c47a411aee99106d
parentde8c5dc76dbfc64071763ddf2376b09a9f65479b
Use ln OutPoints not bitcoin ones in SpendableOutputDescriptors

Lightning OutPoints only have 16 bits to express the output index
instead of Bitcoin's 32 bits, implying that some outputs are
possibly not expressible as lightning OutPoints. However, such
OutPoints can never be hit within the lightning protocol, and must
be on-chain spam sent by a third party wishing to donate us money.
Still, in order to do so, the third party would need to fill nearly
an entire block with garbage, so this case should be relatively
safe.

A new comment in channelmonitor explains the reasoning a bit
further.
lightning/src/chain/keysinterface.rs
lightning/src/ln/channelmonitor.rs
lightning/src/ln/functional_tests.rs
lightning/src/util/macro_logger.rs