mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
elements: include the value + asset tag for 'PSET's
Not strictly necessary as technically this info is included in the witness_utxo, but nice to have
This commit is contained in:
@@ -280,6 +280,16 @@ static struct wally_psbt *psbt_using_utxos(const tal_t *ctx,
|
|||||||
NULL, redeemscript);
|
NULL, redeemscript);
|
||||||
|
|
||||||
psbt_input_set_wit_utxo(psbt, i, scriptPubkey, utxos[i]->amount);
|
psbt_input_set_wit_utxo(psbt, i, scriptPubkey, utxos[i]->amount);
|
||||||
|
if (is_elements(chainparams)) {
|
||||||
|
struct amount_asset asset;
|
||||||
|
/* FIXME: persist asset tags */
|
||||||
|
asset = amount_sat_to_asset(&utxos[i]->amount,
|
||||||
|
chainparams->fee_asset_tag);
|
||||||
|
/* FIXME: persist nonces */
|
||||||
|
psbt_elements_input_set_asset(psbt,
|
||||||
|
psbt->num_inputs - 1,
|
||||||
|
&asset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return psbt;
|
return psbt;
|
||||||
|
|||||||
Reference in New Issue
Block a user