mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-04 17:52:25 +01:00
Merge #17585: rpc: deprecate getaddressinfo label
d3bc184081doc: update release notes with getaddressinfo label deprecation (Jon Atack)72af93f364test: getaddressinfo label deprecation test (Jon Atack)d48875fa20rpc: deprecate getaddressinfo label field (Jon Atack)dc0cabeda4test: remove getaddressinfo label tests (Jon Atack)c7654af6f8doc: address pr17578 review feedback (Jon Atack) Pull request description: This PR builds on #17578 (now merged) and deprecates the rpc getaddressinfo `label` field. The deprecated behavior can be re-enabled by starting bitcoind with `-deprecatedrpc=label`. See http://www.erisian.com.au/bitcoin-core-dev/log-2019-11-22.html#l-622 and https://github.com/bitcoin/bitcoin/pull/17283#issuecomment-554458001 for more context. Reviewers: This PR may be tested manually by building, then running bitcoind with and without the `-deprecatedrpc=label` flag while verifying the rpc getaddressinfo output and help text. Next step: add support for multiple labels. ACKs for top commit: jnewbery: ACKd3bc184081laanwj: ACKd3bc184081meshcollider: utACKd3bc184081Tree-SHA512: f954402884ec54977def332c8160fd892f289b0d2aee1e91fed9ac3220f7e5b1f7fc6421b84cc7a5c824a0582eca4e6fc194e4e33ddd378c733c8941ac45f56d
This commit is contained in:
@@ -36,7 +36,6 @@ class ImportWithLabel(BitcoinTestFramework):
|
||||
address,
|
||||
iswatchonly=True,
|
||||
ismine=False,
|
||||
label=label,
|
||||
labels=[label])
|
||||
|
||||
self.log.info(
|
||||
@@ -45,7 +44,7 @@ class ImportWithLabel(BitcoinTestFramework):
|
||||
)
|
||||
priv_key = self.nodes[0].dumpprivkey(address)
|
||||
self.nodes[1].importprivkey(priv_key)
|
||||
test_address(self.nodes[1], address, label=label, labels=[label])
|
||||
test_address(self.nodes[1], address, labels=[label])
|
||||
|
||||
self.log.info(
|
||||
"Test importaddress without label and importprivkey with label."
|
||||
@@ -57,7 +56,6 @@ class ImportWithLabel(BitcoinTestFramework):
|
||||
address2,
|
||||
iswatchonly=True,
|
||||
ismine=False,
|
||||
label="",
|
||||
labels=[""])
|
||||
|
||||
self.log.info(
|
||||
@@ -68,7 +66,7 @@ class ImportWithLabel(BitcoinTestFramework):
|
||||
label2 = "Test Label 2"
|
||||
self.nodes[1].importprivkey(priv_key2, label2)
|
||||
|
||||
test_address(self.nodes[1], address2, label=label2, labels=[label2])
|
||||
test_address(self.nodes[1], address2, labels=[label2])
|
||||
|
||||
self.log.info("Test importaddress with label and importprivkey with label.")
|
||||
self.log.info("Import a watch-only address with a label.")
|
||||
@@ -79,7 +77,6 @@ class ImportWithLabel(BitcoinTestFramework):
|
||||
address3,
|
||||
iswatchonly=True,
|
||||
ismine=False,
|
||||
label=label3_addr,
|
||||
labels=[label3_addr])
|
||||
|
||||
self.log.info(
|
||||
@@ -90,7 +87,7 @@ class ImportWithLabel(BitcoinTestFramework):
|
||||
label3_priv = "Test Label 3 for importprivkey"
|
||||
self.nodes[1].importprivkey(priv_key3, label3_priv)
|
||||
|
||||
test_address(self.nodes[1], address3, label=label3_priv, labels=[label3_priv])
|
||||
test_address(self.nodes[1], address3, labels=[label3_priv])
|
||||
|
||||
self.log.info(
|
||||
"Test importprivkey won't label new dests with the same "
|
||||
@@ -104,7 +101,6 @@ class ImportWithLabel(BitcoinTestFramework):
|
||||
address4,
|
||||
iswatchonly=True,
|
||||
ismine=False,
|
||||
label=label4_addr,
|
||||
labels=[label4_addr],
|
||||
embedded=None)
|
||||
|
||||
@@ -118,9 +114,9 @@ class ImportWithLabel(BitcoinTestFramework):
|
||||
self.nodes[1].importprivkey(priv_key4)
|
||||
embedded_addr = self.nodes[1].getaddressinfo(address4)['embedded']['address']
|
||||
|
||||
test_address(self.nodes[1], embedded_addr, label="", labels=[""])
|
||||
test_address(self.nodes[1], embedded_addr, labels=[""])
|
||||
|
||||
test_address(self.nodes[1], address4, label=label4_addr, labels=[label4_addr])
|
||||
test_address(self.nodes[1], address4, labels=[label4_addr])
|
||||
|
||||
self.stop_nodes()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user