mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
commit_tx: remove to_me weirdness.
It's a synonym for theirkey. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -17,7 +17,7 @@ struct bitcoin_tx *create_commit_tx(const tal_t *ctx,
|
|||||||
{
|
{
|
||||||
struct bitcoin_tx *tx;
|
struct bitcoin_tx *tx;
|
||||||
const u8 *redeemscript;
|
const u8 *redeemscript;
|
||||||
struct pubkey ourkey, theirkey, to_me;
|
struct pubkey ourkey, theirkey;
|
||||||
u32 locktime;
|
u32 locktime;
|
||||||
|
|
||||||
/* Now create commitment tx: one input, two outputs. */
|
/* Now create commitment tx: one input, two outputs. */
|
||||||
@@ -47,11 +47,9 @@ struct bitcoin_tx *create_commit_tx(const tal_t *ctx,
|
|||||||
tx->output[0].amount = to_us;
|
tx->output[0].amount = to_us;
|
||||||
|
|
||||||
/* Second output is a P2SH payment to them. */
|
/* Second output is a P2SH payment to them. */
|
||||||
if (!proto_to_pubkey(theirs->final_key, &to_me))
|
|
||||||
return tal_free(tx);
|
|
||||||
tx->output[1].script = scriptpubkey_p2sh(ctx,
|
tx->output[1].script = scriptpubkey_p2sh(ctx,
|
||||||
bitcoin_redeem_single(ctx,
|
bitcoin_redeem_single(ctx,
|
||||||
&to_me));
|
&theirkey));
|
||||||
tx->output[1].script_length = tal_count(tx->output[1].script);
|
tx->output[1].script_length = tal_count(tx->output[1].script);
|
||||||
tx->output[1].amount = to_them;
|
tx->output[1].amount = to_them;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user