mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
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:
@@ -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) */
|
||||
|
||||
Reference in New Issue
Block a user