mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-01 00:10:44 +01:00
rpc: simplify getaddressinfo labels, deprecate previous behavior
- change the value returned in the RPC getaddressinfo `labels` field to an array of label name strings - deprecate the previous behavior of returning a JSON hash structure containing label `name` and address `purpose` key/value pairs - update the relevant tests
This commit is contained in:
@@ -15,10 +15,7 @@ from test_framework.util import (
|
||||
connect_nodes,
|
||||
wait_until,
|
||||
)
|
||||
from test_framework.wallet_util import (
|
||||
labels_value,
|
||||
test_address,
|
||||
)
|
||||
from test_framework.wallet_util import test_address
|
||||
|
||||
|
||||
class WalletTest(BitcoinTestFramework):
|
||||
@@ -395,7 +392,7 @@ class WalletTest(BitcoinTestFramework):
|
||||
for label in [u'рыба', u'𝅘𝅥𝅯']:
|
||||
addr = self.nodes[0].getnewaddress()
|
||||
self.nodes[0].setlabel(addr, label)
|
||||
test_address(self.nodes[0], addr, label=label, labels=labels_value(name=label))
|
||||
test_address(self.nodes[0], addr, label=label, labels=[label])
|
||||
assert label in self.nodes[0].listlabels()
|
||||
self.nodes[0].rpc.ensure_ascii = True # restore to default
|
||||
|
||||
|
||||
Reference in New Issue
Block a user