bitcoin: make psbt_append_input more powerful.

It can now handle all the metadata as well as the base tx input.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-08-20 14:26:33 +09:30
parent 172b9d7ae3
commit a0ede40743
4 changed files with 80 additions and 7 deletions

View File

@@ -93,7 +93,7 @@ static const u8 *linearize_output(const tal_t *ctx,
/* Add a 'fake' input so this will linearize the tx */
memset(&txid, 0, sizeof(txid));
psbt_append_input(psbt, &txid, 0, 0);
psbt_append_input(psbt, &txid, 0, 0, NULL, AMOUNT_SAT(0), NULL, NULL, NULL);
if (wally_tx_add_output(psbt->tx, tx_out) != WALLY_OK)
abort();