psbt: add transaction inputs to the psbt struct

Make sure that we permute them also!

Fixes weird spacing also
This commit is contained in:
niftynei
2020-05-21 11:27:00 +09:30
committed by Rusty Russell
parent a1e1073752
commit cf9de86dba
4 changed files with 42 additions and 15 deletions

View File

@@ -168,6 +168,7 @@ int bitcoin_tx_add_input(struct bitcoin_tx *tx, const struct bitcoin_txid *txid,
NULL /* Empty witness stack */, &input);
input->features = chainparams->is_elements ? WALLY_TX_IS_ELEMENTS : 0;
wally_tx_add_input(tx->wtx, input);
psbt_add_input(tx->psbt, input, i);
wally_tx_input_free(input);
/* Now store the input amount if we know it, so we can sign later */