addr: handle P2SH/P2PKH in scriptpubkey encoding

Previously, returned null if a scriptpubkey was not Segwit; now
handles encoding to Base58 for other types.
This commit is contained in:
lisa neigut
2019-10-29 12:00:18 -05:00
committed by Rusty Russell
parent 6f215a70e5
commit 963a1da958
8 changed files with 31 additions and 14 deletions

View File

@@ -470,8 +470,7 @@ static void init(struct plugin_conn *rpc,
"network")),
rpc, ".network");
chainparams = chainparams_for_network(network_name);
placeholder_funding_addr = encode_scriptpubkey_to_addr(NULL,
chainparams->bip173_name,
placeholder_funding_addr = encode_scriptpubkey_to_addr(NULL, chainparams,
placeholder);
}