psbt: update global tx output amount also

This commit is contained in:
niftynei 2020-05-21 11:27:00 +09:30 committed by Rusty Russell
parent cf9de86dba
commit 2055b53425

View file

@ -217,6 +217,10 @@ void bitcoin_tx_output_set_amount(struct bitcoin_tx *tx, int outnum,
assert(ret == WALLY_OK);
} else {
output->satoshi = satoshis;
/* update the global tx for the psbt also */
output = &tx->psbt->tx->outputs[outnum];
output->satoshi = satoshis;
}
}