protocol: switch to single-funder anchor model.

Most complex change was gather_updates(), which handles all the "what
is the current state of the channel" logic for our dumb test utils.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2015-07-29 16:14:28 +09:30
parent 2255cb749d
commit eac3af06f1
35 changed files with 1078 additions and 1608 deletions

16
test-cli/gather_updates.h Normal file
View File

@@ -0,0 +1,16 @@
#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,
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 */