create_commit_tx: don't use protobufs in the API.

Hand anchor details and pubkeys directly; this is what we want
for the actual daemon which doesn't keep raw packets around.

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 65cc6bbd50
commit d95d8a99c2
11 changed files with 74 additions and 40 deletions

View File

@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
redeemscript = bitcoin_redeem_2of2(ctx, &pubkey1, &pubkey2);
/* Check their signature signs our new commit tx correctly. */
commit = create_commit_tx(ctx, o1, o2, a, &our_rhash, cstate);
commit = commit_tx_from_pkts(ctx, o1, o2, a, &our_rhash, cstate);
if (!commit)
errx(1, "Delta too large");