mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-19 05:44:28 +01:00
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:
committed by
Rusty Russell
parent
6f215a70e5
commit
963a1da958
@@ -12,6 +12,7 @@ PLUGIN_LIB_HEADER := plugins/libplugin.h
|
||||
PLUGIN_LIB_OBJS := $(PLUGIN_LIB_SRC:.c=.o)
|
||||
|
||||
PLUGIN_COMMON_OBJS := \
|
||||
bitcoin/base58.o \
|
||||
bitcoin/pubkey.o \
|
||||
bitcoin/pullpush.o \
|
||||
bitcoin/script.o \
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user