funding: remove protobufs.

Use our own structure with the information we need about HTLCs,
and remove protobufs from the API.

The is_funder() helper goes inside gather_updates.h.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-01-22 06:41:47 +10:30
parent d95d8a99c2
commit 6d6abd57e7
13 changed files with 188 additions and 106 deletions

View File

@@ -63,7 +63,10 @@ int main(int argc, char *argv[])
errx(1, "Private key '%s' not on testnet!", argv[5]);
/* Figure out cumulative delta since anchor. */
cstate = gather_updates(ctx, o1, o2, a, commit_fee(o1, o2), argv + 6,
cstate = gather_updates(ctx, o1, o2, a,
commit_fee(o1->commitment_fee,
o2->commitment_fee),
argv + 6,
&num_updates, NULL, &their_rhash, NULL);
/* Get next revocation hash. */