update-channel-accept: accept the channel update.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2015-06-09 05:59:06 +09:30
parent d51f6372aa
commit 3957f1e1c1
9 changed files with 157 additions and 7 deletions

View File

@@ -34,6 +34,7 @@ int main(int argc, char *argv[])
bool testnet;
struct pubkey pubkey1, pubkey2;
u8 *subscript;
struct sha256 rhash;
err_set_progname(argv[0]);
@@ -65,7 +66,8 @@ int main(int argc, char *argv[])
anchor_txid(anchor, argv[4], argv[5], inmap, &txid);
/* Now create THEIR commitment tx to spend 2/2 output of anchor. */
commit = create_commit_tx(ctx, o2, o1, 0, &txid, outmap[0]);
proto_to_sha256(o1->revocation_hash, &rhash);
commit = create_commit_tx(ctx, o2, o1, &rhash, 0, &txid, outmap[0]);
/* If contributions don't exceed fees, this fails. */
if (!commit)