mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
tx-psbt: pass in the witness script (if known) when adding an input
Update the `bitcoin_tx_add_input` interface to accept a witness script and or scriptPubkey. We save the amount + witness script + witness program (if known) to the PSBT object for a transaction when creating an input.
This commit is contained in:
committed by
Christian Decker
parent
a04f0fe250
commit
dc868630a8
@@ -76,6 +76,7 @@ static inline struct amount_sat commit_tx_base_fee(u32 feerate_per_kw,
|
||||
* initial_commit_tx: create (unsigned) commitment tx to spend the funding tx output
|
||||
* @ctx: context to allocate transaction and @htlc_map from.
|
||||
* @funding_txid, @funding_out, @funding: funding outpoint.
|
||||
* @funding_wscript: scriptPubkey of the funding output
|
||||
* @opener: is the LOCAL or REMOTE paying the fee?
|
||||
* @keyset: keys derived for this commit tx.
|
||||
* @feerate_per_kw: feerate to use
|
||||
@@ -96,6 +97,7 @@ struct bitcoin_tx *initial_commit_tx(const tal_t *ctx,
|
||||
const struct bitcoin_txid *funding_txid,
|
||||
unsigned int funding_txout,
|
||||
struct amount_sat funding,
|
||||
u8 *funding_wscript,
|
||||
enum side opener,
|
||||
u16 to_self_delay,
|
||||
const struct keyset *keyset,
|
||||
|
||||
Reference in New Issue
Block a user