Fix test broken by change indicator
This commit is contained in:
parent
0646f749f9
commit
62d707d1fd
|
@ -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(True), True)
|
||||
|
||||
# Node 3 should see the same received notes as node 2
|
||||
assert_equal(
|
||||
self.nodes[2].z_listreceivedbyaddress(myzaddr),
|
||||
self.nodes[3].z_listreceivedbyaddress(myzaddr))
|
||||
# Node 3 should see the same received notes as node 2; however,
|
||||
# some of the notes were change for note 2 but not for note 3.
|
||||
# Aside from that the recieved notes should be the same. So,
|
||||
# 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
|
||||
# to include watch-only balances
|
||||
|
|
Loading…
Reference in New Issue