-
Notifications
You must be signed in to change notification settings - Fork 906
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closingd: configurable closing fee negotiation step
When negotiating the transaction fee for closing a channel [1], we used to always pick the middle of the range between our proposal and the peer's proposal. Introduce a new option `fee_negotiation_step` to the close command, so the peer who initiates the close can choose his back off step. Partially resolves #3270 [1] https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md#closing-negotiation-closing_signed Changelog-Added: New optional parameter to the `close` command to control the closing transaction fee negotiation back off step
- Loading branch information
Showing
13 changed files
with
259 additions
and
54 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#ifndef LIGHTNING_COMMON_CLOSING_FEE_H | ||
#define LIGHTNING_COMMON_CLOSING_FEE_H | ||
|
||
#include <ccan/short_types/short_types.h> | ||
|
||
/** During closing fee negotiation give up N% of the range between our | ||
* proposal and the peer's proposal on each step. */ | ||
static const u8 CLOSING_FEE_NEGOTIATION_STEP_UNIT_PERCENTAGE = 0; | ||
|
||
/** During closing fee negotiation give up N satoshi of the range between our | ||
* proposal and the peer's proposal on each step. */ | ||
static const u8 CLOSING_FEE_NEGOTIATION_STEP_UNIT_SATOSHI = 1; | ||
|
||
#endif /* LIGHTNING_COMMON_CLOSING_FEE_H */ |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.