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:
7 files changed
+40
-70
No files matched your search
@@ -11,10 +11,7 @@ from test_framework.util import (
|
||||
assert_equal,
|
||||
assert_raises_rpc_error,
|
||||
)
|
||||
from test_framework.wallet_util import (
|
||||
labels_value,
|
||||
test_address,
|
||||
)
|
||||
from test_framework.wallet_util import test_address
|
||||
|
||||
|
||||
class ReceivedByTest(BitcoinTestFramework):
|
||||
@@ -131,7 +128,7 @@ class ReceivedByTest(BitcoinTestFramework):
|
||||
# set pre-state
|
||||
label = ''
|
||||
address = self.nodes[1].getnewaddress()
|
||||
test_address(self.nodes[1], address, label=label, labels=labels_value(name=label))
|
||||
test_address(self.nodes[1], address, label=label, labels=[label])
|
||||
received_by_label_json = [r for r in self.nodes[1].listreceivedbylabel() if r["label"] == label][0]
|
||||
balance_by_label = self.nodes[1].getreceivedbylabel(label)
|
||||
|
||||
|
||||
Reference in new issue
Block a user