mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-27 01:34:20 +01:00
bitcoin: bitcoin_tx_remove_output()
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user