Skip to content

Commit

Permalink
fix wallet_import_rescan.py
Browse files Browse the repository at this point in the history
  • Loading branch information
alex v committed Aug 30, 2024
1 parent c4de034 commit 6926833
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/functional/wallet_import_rescan.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,13 @@ def do_import(self, timestamp):
)
assert_equal(response, [{"success": True}])

def check(self, txid=None, amount=None, confirmation_height=None):
def check(self, txid=None, amount=None, confirmation_height=None, pending=False):
"""Verify that listtransactions/listreceivedbyaddress return expected values."""

txs = self.node.listtransactions(label=self.label, count=10000, include_watchonly=True)
if pending:
txs = self.node.listpendingtransactions(label=self.label, count=10000, include_watchonly=True)
else:
txs = self.node.listtransactions(label=self.label, count=10000, include_watchonly=True)
current_height = self.node.getblockcount()
assert_equal(len(txs), self.expected_txs)

Expand Down Expand Up @@ -323,7 +326,7 @@ def run_test(self):
assert_equal(variant.node.gettransaction(variant.child_txid)['confirmations'], 0)
variant.amount_received = variant.initial_amount
variant.expected_txs = 1
variant.check(variant.initial_txid, variant.initial_amount, 0)
variant.check(variant.initial_txid, variant.initial_amount, 0, True)
else:
variant.amount_received = 0
variant.expected_txs = 0
Expand Down

0 comments on commit 6926833

Please sign in to comment.