listfunds: add scriptpubkey if it's known.

(Which it is, since 0.7.3).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON: `listfunds` now has a 'scriptpubkey' field.
This commit is contained in:
Rusty Russell
2020-07-08 06:20:25 +09:30
committed by Christian Decker
parent 972432d285
commit 94de18ace7
3 changed files with 4 additions and 0 deletions

View File

@@ -856,6 +856,7 @@ static void json_add_utxo(struct json_stream *response,
"value", "amount_msat");
if (utxo->scriptPubkey != NULL) {
json_add_hex_talarr(response, "scriptpubkey", utxo->scriptPubkey);
out = encode_scriptpubkey_to_addr(
tmpctx, chainparams,
utxo->scriptPubkey);