]> git.bitcoin.ninja Git - rust-lightning/commit
Avoid claiming remote received HTLCs with preimage
authorAntoine Riard <ariard@student.42.fr>
Wed, 13 Nov 2019 00:27:55 +0000 (19:27 -0500)
committerAntoine Riard <ariard@student.42.fr>
Wed, 13 Nov 2019 00:27:55 +0000 (19:27 -0500)
commit543b0983f66c42c8e544ac84e96bba5c69e3b78f
treee2457d5e3965673ad9f6712941f4214ee5a581b4
parent2afd53148f42eb9b7319d3e8841578aacdc31e6e
Avoid claiming remote received HTLCs with preimage

In case of duplicate HTLCs with same hash going in opposite
directions we may learn preimage of offered one, but we shouldn't
claim received one to avoid invalidation of combined claim.
The received HTLC is going to be claimed by a timeout tx at
timelock expiration.

Fix #337
src/ln/channelmonitor.rs