mkfunding: no scriptPubKey on utxo causing crash, so we add one

Changelog-Fixed: devtools: `mkfunding` command no longer crashes (abort)

Fixes #5363

Assisted-By: @TKChattoraj
This commit is contained in:
niftynei 2022-10-27 11:25:12 -05:00 committed by Christian Decker
parent 87616b7ffc
commit 7bd0d7641c

View File

@ -144,6 +144,9 @@ int main(int argc, char *argv[])
type_to_string(NULL, struct amount_sat, &input.amount),
type_to_string(NULL, struct amount_sat, &fee));
/* Find the P2WPKH script from input pubkey */
input.scriptPubkey = scriptpubkey_p2wpkh(NULL, &inputkey);
/* No change output, so we don't need a bip32 base. */
tx = funding_tx(NULL, &input, funding_amount,
&funding_localkey, &funding_remotekey);