]> git.bitcoin.ninja Git - rust-lightning/commit
Correct initial commitment check in inbound channel-open handling.
authorMatt Corallo <git@bluematt.me>
Wed, 1 Apr 2020 21:11:12 +0000 (17:11 -0400)
committerMatt Corallo <git@bluematt.me>
Mon, 25 May 2020 19:36:59 +0000 (15:36 -0400)
commita0723643d2a0d69a8037e6bb2e35b4a4c7788ba2
tree096ce9df63f53a476157662753516275d33d45d0
parentd5d4337edc111852c83ab1dd68299bc308759673
Correct initial commitment check in inbound channel-open handling.

Previously, we would reject inbound channels if the funder wasn't
able to afford both the initial commitment transaction fee and the
initial commitment didn't meet both our and our counterparty's
reserve value.

We never bothered to check if it was impossible for them to meet
both reserve values, and meeting their own reserve is perfectly
acceptable anyway (as long as they eventually meet it).

The easy fix is to just check that they at least have enough funds
back to themselves on the initial commitment to meet our reserve,
though we could be more careful in the future.
lightning/src/ln/channel.rs
lightning/src/ln/functional_tests.rs