forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
channeld: don't add HTLCs if that would drive us negative.
We track whether each change is affordable as we go; test_channel_drainage got us so close that the difference mattered; we hit an assert when we tried to commit the tx and realized we couldn't afford it. We should not be trying to add an HTLC if it will result in the funder being unable to afford it on either the local *or remote* commitments. Note the test still "fails" because it refuses to send the final payment. Signed-off-by: Rusty Russell <[email protected]>
- Loading branch information
1 parent
431401a
commit 1275928
Showing
2 changed files
with
146 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters