Skip to content

Commit

Permalink
newaddr: don't include "address" field.
Browse files Browse the repository at this point in the history
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: JSON-RPC: `newaddr` no longer includes `address` field (deprecated in 0.7.1)
  • Loading branch information
rustyrussell committed Apr 7, 2021
1 parent da4c2ca commit 9c3cf5a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
8 changes: 0 additions & 8 deletions tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions wallet/walletrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9c3cf5a

Please sign in to comment.