mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-07 08:04:23 +01:00
protocol: add commitment fee logic.
Both sides elect a commitment fee, and the lowest is chosen. That means you can't game the other side (but if you offer too low, then can error out of course). Fees are split 50-50 if possible: originally the whole fee has to be paid by the (single) funder. Neither side can withdraw funds which would make them unable to pay fees. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -127,6 +127,10 @@ struct _OpenChannel
|
||||
*/
|
||||
protobuf_c_boolean has_min_depth;
|
||||
uint32_t min_depth;
|
||||
/*
|
||||
* How much fee would I like on commitment tx?
|
||||
*/
|
||||
uint64_t commitment_fee;
|
||||
OpenChannel__LocktimeCase locktime_case;
|
||||
union {
|
||||
uint32_t locktime_seconds;
|
||||
@@ -135,7 +139,7 @@ struct _OpenChannel
|
||||
};
|
||||
#define OPEN_CHANNEL__INIT \
|
||||
{ PROTOBUF_C_MESSAGE_INIT (&open_channel__descriptor) \
|
||||
, NULL, NULL, NULL, 0, 0,0u, OPEN_CHANNEL__LOCKTIME__NOT_SET, {} }
|
||||
, NULL, NULL, NULL, 0, 0,0u, 0, OPEN_CHANNEL__LOCKTIME__NOT_SET, {} }
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user