mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-12-27 09:04:40 +01:00
158d2212c2
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 https://github.com/ElementsProject/lightning/issues/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
17 lines
573 B
C
17 lines
573 B
C
#ifndef LIGHTNING_COMMON_CLOSING_FEE_H
|
|
#define LIGHTNING_COMMON_CLOSING_FEE_H
|
|
|
|
#include "config.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 */
|