]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fix channel reserve calculation on the sending side 2021-07-fix-chan-reserve-msat-sat
authorMatt Corallo <git@bluematt.me>
Sun, 4 Jul 2021 14:46:17 +0000 (14:46 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 13 Jul 2021 17:13:58 +0000 (17:13 +0000)
As the variable name implies holder_selected_chan_reserve_msat is
intended to be in millisatoshis, but is instead calculated in
satoshis.

We fix that error here and update the relevant tests to more
accurately calculate the expected reserve value and test both
success and failure cases.

Bug discovered by chanmon_consistency fuzz target.


No differences found