protocol fix: use locktime from *other* side.

Which emerged clearly when setting one side's locktime differently than
the other.

Each side specifies the (minimum) time they need to notice a fraud attempt:
this constrains the *other* side.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2015-07-02 06:44:59 +09:30
parent 66b1df4036
commit 20bb6c65aa
4 changed files with 8 additions and 8 deletions

View File

@@ -37,7 +37,7 @@ struct bitcoin_tx *create_commit_tx(const tal_t *ctx,
if (!proto_to_pubkey(theirs->final, &theirkey))
return tal_free(tx);
if (!proto_to_locktime(ours, &locktime))
if (!proto_to_locktime(theirs, &locktime))
return tal_free(tx);
/* First output is a P2SH to a complex redeem script (usu. for me) */