Fix test broken by change indicator
This commit is contained in:
@@ -188,10 +188,23 @@ class WalletNullifiersTest (BitcoinTestFramework):
|
|||||||
assert_equal(myzaddr in self.nodes[3].z_listaddresses(), False)
|
assert_equal(myzaddr in self.nodes[3].z_listaddresses(), False)
|
||||||
assert_equal(myzaddr in self.nodes[3].z_listaddresses(True), True)
|
assert_equal(myzaddr in self.nodes[3].z_listaddresses(True), True)
|
||||||
|
|
||||||
# Node 3 should see the same received notes as node 2
|
# Node 3 should see the same received notes as node 2; however,
|
||||||
assert_equal(
|
# some of the notes were change for note 2 but not for note 3.
|
||||||
self.nodes[2].z_listreceivedbyaddress(myzaddr),
|
# Aside from that the recieved notes should be the same. So,
|
||||||
self.nodes[3].z_listreceivedbyaddress(myzaddr))
|
# group by txid and then check that all properties aside from
|
||||||
|
# change are equal.
|
||||||
|
node2Received = dict([r['txid'], r] for r in self.nodes[2].z_listreceivedbyaddress(myzaddr))
|
||||||
|
node3Received = dict([r['txid'], r] for r in self.nodes[3].z_listreceivedbyaddress(myzaddr))
|
||||||
|
assert_equal(len(node2Received), len(node2Received))
|
||||||
|
for txid in node2Received:
|
||||||
|
received2 = node2Received[txid]
|
||||||
|
received3 = node3Received[txid]
|
||||||
|
assert_equal(len(received2), len(received3))
|
||||||
|
for key in received2:
|
||||||
|
# check all the properties except for change
|
||||||
|
if key != 'change':
|
||||||
|
assert_equal(received2[key], received3[key])
|
||||||
|
|
||||||
|
|
||||||
# Node 3's balances should be unchanged without explicitly requesting
|
# Node 3's balances should be unchanged without explicitly requesting
|
||||||
# to include watch-only balances
|
# to include watch-only balances
|
||||||
|
|||||||
Reference in New Issue
Block a user