Introduce ChannelMonitor::is_paying_spendable_output
authorAntoine Riard <ariard@student.42.fr>
Wed, 18 Mar 2020 20:56:32 +0000 (16:56 -0400)
committerAntoine Riard <ariard@student.42.fr>
Fri, 20 Mar 2020 02:29:26 +0000 (22:29 -0400)
commit26ac188a3f9f7ce7bc0a1bc4abbbf20e8e3258eb
tree82e317a28b7ca3e06d327037f5c6735cf3c91287
parentc61d7de892b41eb4018083bfdabc6abb34a9399c
Introduce ChannelMonitor::is_paying_spendable_output

Previously, we would generate SpendableOutputDescriptor::StaticOutput
in OnchainTxHandler even if our claiming transaction wouldn't confirm
onchain, misbehaving user wallet to think it receives more funds than
in reality.

Fix tests in consequence
lightning/src/ln/channelmonitor.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/onchaintx.rs