wallet: Pass chainparams to address serialization

The chainparams are needed to know the prefixes, so instead of passing down
the testnet, we pass the entire params struct.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker
2019-05-06 23:17:15 +02:00
committed by Rusty Russell
parent ff5dfb1cc4
commit 0d19d04def
5 changed files with 12 additions and 11 deletions

View File

@@ -125,12 +125,12 @@ int main(int argc, char *argv[])
printf("fallback: %s\n", tal_hex(ctx, b11->fallbacks[i]));
if (is_p2pkh(b11->fallbacks[i], &pkh)) {
printf("fallback-P2PKH: %s\n",
bitcoin_to_base58(ctx, b11->chain->testnet,
bitcoin_to_base58(ctx, b11->chain,
&pkh));
} else if (is_p2sh(b11->fallbacks[i], &sh)) {
printf("fallback-P2SH: %s\n",
p2sh_to_base58(ctx,
b11->chain->testnet,
b11->chain,
&sh));
} else if (is_p2wpkh(b11->fallbacks[i], &pkh)) {
char out[73 + strlen(b11->chain->bip173_name)];