core-lightning/test-cli/gather_updates.h
Rusty Russell 3260fb2ed1 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>
2015-07-29 16:16:24 +09:30

17 lines
418 B
C

#ifndef GATHER_UPDATES_H
#define GATHER_UPDATES_H
#include "lightning.pb-c.h"
struct signature;
struct sha256;
uint64_t gather_updates(const OpenChannel *o1, const OpenChannel *o2,
const OpenAnchor *oa, uint64_t fee,
char **argv,
uint64_t *our_amount, uint64_t *their_amount,
struct sha256 *our_rhash,
struct sha256 *their_rhash,
struct signature *their_commit_sig);
#endif /* GATHER_UPDATES_H */