mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-08 15:44:19 +01:00
script: use the normalized delay script form for commit output.
As documented in the paper; it's also two bytes shorter, and allows us to use the exact same script for three cases. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -41,10 +41,10 @@ struct bitcoin_tx *create_commit_tx(const tal_t *ctx,
|
||||
return tal_free(tx);
|
||||
|
||||
/* First output is a P2SH to a complex redeem script (usu. for me) */
|
||||
redeemscript = bitcoin_redeem_revocable(tx, &ourkey,
|
||||
locktime,
|
||||
&theirkey,
|
||||
rhash);
|
||||
redeemscript = bitcoin_redeem_secret_or_delay(tx, &ourkey,
|
||||
locktime,
|
||||
&theirkey,
|
||||
rhash);
|
||||
tx->output[0].script = scriptpubkey_p2sh(tx, redeemscript);
|
||||
tx->output[0].script_length = tal_count(tx->output[0].script);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user