core-lightning/common/closing_fee.h
Vasil Dimov 158d2212c2 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 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
2020-04-07 13:52:48 +09:30

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 */