mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 20:09:18 +01:00
bitcoin: bitcoin_tx_remove_output()
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
34f25db435
commit
d502a7ecbb
2 changed files with 12 additions and 0 deletions
|
@ -95,6 +95,15 @@ int bitcoin_tx_add_output(struct bitcoin_tx *tx, const u8 *script,
|
|||
return i;
|
||||
}
|
||||
|
||||
void bitcoin_tx_remove_output(struct bitcoin_tx *tx, size_t outnum)
|
||||
{
|
||||
int ret;
|
||||
ret = wally_tx_remove_output(tx->wtx, outnum);
|
||||
assert(ret == WALLY_OK);
|
||||
ret = wally_psbt_remove_output(tx->psbt, outnum);
|
||||
assert(ret == WALLY_OK);
|
||||
}
|
||||
|
||||
bool elements_wtx_output_is_fee(const struct wally_tx *tx, int outnum)
|
||||
{
|
||||
assert(outnum < tx->num_outputs);
|
||||
|
|
|
@ -104,6 +104,9 @@ int bitcoin_tx_add_output(struct bitcoin_tx *tx, const u8 *script,
|
|||
const u8 *wscript,
|
||||
struct amount_sat amount);
|
||||
|
||||
/* Remove one output. */
|
||||
void bitcoin_tx_remove_output(struct bitcoin_tx *tx, size_t outnum);
|
||||
|
||||
/* Set the locktime for a transaction */
|
||||
void bitcoin_tx_set_locktime(struct bitcoin_tx *tx, u32 locktime);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue