From 9c3cf5aff9a72e3d1b5c6d222962da9f0dd6e776 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 7 Apr 2021 11:58:05 +0930 Subject: [PATCH] newaddr: don't include "address" field. Signed-off-by: Rusty Russell Changelog-Removed: JSON-RPC: `newaddr` no longer includes `address` field (deprecated in 0.7.1) --- tests/test_misc.py | 8 -------- wallet/walletrpc.c | 3 --- 2 files changed, 11 deletions(-) diff --git a/tests/test_misc.py b/tests/test_misc.py index e45aff0b0..b3668494e 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -1771,14 +1771,6 @@ def test_newaddr(node_factory, chainparams): assert both['bech32'].startswith(chainparams['bip173_prefix']) -def test_newaddr_deprecated(node_factory, chainparams): - l1 = node_factory.get_node(options={'allow-deprecated-apis': True}) - p2sh = l1.rpc.newaddr('p2sh-segwit') - assert p2sh['address'].startswith(chainparams['p2sh_prefix']) - bech32 = l1.rpc.newaddr('bech32') - assert bech32['address'].startswith(chainparams['bip173_prefix']) - - def test_bitcoind_fail_first(node_factory, bitcoind, executor): """Make sure we handle spurious bitcoin-cli failures during startup diff --git a/wallet/walletrpc.c b/wallet/walletrpc.c index dfedbe127..2286313b5 100644 --- a/wallet/walletrpc.c +++ b/wallet/walletrpc.c @@ -151,9 +151,6 @@ static struct command_result *json_newaddr(struct command *cmd, } response = json_stream_success(cmd); - if (deprecated_apis && *addrtype != ADDR_ALL) - json_add_string(response, "address", - *addrtype & ADDR_BECH32 ? bech32 : p2sh); if (*addrtype & ADDR_BECH32) json_add_string(response, "bech32", bech32); if (*addrtype & ADDR_P2SH_SEGWIT)