Fix assertion and comment
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
from test_framework.test_framework import BitcoinTestFramework
|
from test_framework.test_framework import BitcoinTestFramework
|
||||||
from test_framework.util import assert_equal, start_node, \
|
from test_framework.util import assert_equal, assert_true, start_node, \
|
||||||
start_nodes, connect_nodes_bi, bitcoind_processes
|
start_nodes, connect_nodes_bi, bitcoind_processes
|
||||||
|
|
||||||
import time
|
import time
|
||||||
@@ -189,7 +189,7 @@ class WalletNullifiersTest (BitcoinTestFramework):
|
|||||||
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; however,
|
# 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.
|
# some of the notes were change for node 2 but not for node 3.
|
||||||
# Aside from that the recieved notes should be the same. So,
|
# Aside from that the recieved notes should be the same. So,
|
||||||
# group by txid and then check that all properties aside from
|
# group by txid and then check that all properties aside from
|
||||||
# change are equal.
|
# change are equal.
|
||||||
@@ -199,7 +199,8 @@ class WalletNullifiersTest (BitcoinTestFramework):
|
|||||||
for txid in node2Received:
|
for txid in node2Received:
|
||||||
received2 = node2Received[txid]
|
received2 = node2Received[txid]
|
||||||
received3 = node3Received[txid]
|
received3 = node3Received[txid]
|
||||||
assert_equal(len(received2), len(received3))
|
# the change field will be omitted for received3, but all other fields should be shared
|
||||||
|
assert_true(len(received2) >= len(received3))
|
||||||
for key in received2:
|
for key in received2:
|
||||||
# check all the properties except for change
|
# check all the properties except for change
|
||||||
if key != 'change':
|
if key != 'change':
|
||||||
|
|||||||
Reference in New Issue
Block a user