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

@@ -82,6 +82,11 @@ void connect_succeeded(struct lightningd *ld UNNEEDED, const struct node_id *id
void delay_then_reconnect(struct channel *channel UNNEEDED, u32 seconds_delay UNNEEDED,
const struct wireaddr_internal *addrhint TAKES UNNEEDED)
{ fprintf(stderr, "delay_then_reconnect called!\n"); abort(); }
/* Generated stub for encode_scriptpubkey_to_addr */
char *encode_scriptpubkey_to_addr(const tal_t *ctx UNNEEDED,
const struct chainparams *chainparams UNNEEDED,
const u8 *scriptPubkey UNNEEDED)
{ fprintf(stderr, "encode_scriptpubkey_to_addr called!\n"); abort(); }
/* Generated stub for fail_htlc */
void fail_htlc(struct htlc_in *hin UNNEEDED, enum onion_type failcode UNNEEDED)
{ fprintf(stderr, "fail_htlc called!\n"); abort(); }