mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 06:54:30 +01:00
bitcoin/tx: pass struct amount_sat by copy.
This is the normal convention for this type; it makes using converters a little easier. See next patch. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -175,7 +175,7 @@ struct bitcoin_tx *initial_commit_tx(const tal_t *ctx,
|
||||
u8 *wscript = to_self_wscript(tmpctx, to_self_delay, keyset);
|
||||
amount = amount_msat_to_sat_round_down(self_pay);
|
||||
int pos = bitcoin_tx_add_output(
|
||||
tx, scriptpubkey_p2wsh(tx, wscript), &amount);
|
||||
tx, scriptpubkey_p2wsh(tx, wscript), amount);
|
||||
assert(pos == n);
|
||||
n++;
|
||||
}
|
||||
@@ -197,7 +197,7 @@ struct bitcoin_tx *initial_commit_tx(const tal_t *ctx,
|
||||
amount = amount_msat_to_sat_round_down(other_pay);
|
||||
int pos = bitcoin_tx_add_output(
|
||||
tx, scriptpubkey_p2wpkh(tx, &keyset->other_payment_key),
|
||||
&amount);
|
||||
amount);
|
||||
assert(pos == n);
|
||||
n++;
|
||||
}
|
||||
@@ -236,7 +236,7 @@ struct bitcoin_tx *initial_commit_tx(const tal_t *ctx,
|
||||
* * `txin[0]` script bytes: 0
|
||||
*/
|
||||
sequence = (0x80000000 | ((obscured_commitment_number>>24) & 0xFFFFFF));
|
||||
bitcoin_tx_add_input(tx, funding_txid, funding_txout, sequence, &funding, NULL);
|
||||
bitcoin_tx_add_input(tx, funding_txid, funding_txout, sequence, funding, NULL);
|
||||
|
||||
assert(bitcoin_tx_check(tx));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user