Changeset View
Changeset View
Standalone View
Standalone View
test/functional/import-rescan.py
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | def check(self, txid=None, amount=None, confirmations=None): | ||||
balance = self.node.getbalance(self.label, 0, True) | balance = self.node.getbalance(self.label, 0, True) | ||||
assert_equal(balance, self.expected_balance) | assert_equal(balance, self.expected_balance) | ||||
txs = self.node.listtransactions(self.label, 10000, 0, True) | txs = self.node.listtransactions(self.label, 10000, 0, True) | ||||
assert_equal(len(txs), self.expected_txs) | assert_equal(len(txs), self.expected_txs) | ||||
if txid is not None: | if txid is not None: | ||||
tx, = [tx for tx in txs if tx["txid"] == txid] | tx, = [tx for tx in txs if tx["txid"] == txid] | ||||
assert_equal(tx["account"], self.label) | assert_equal(tx["label"], self.label) | ||||
assert_equal(tx["address"], self.address["address"]) | assert_equal(tx["address"], self.address["address"]) | ||||
assert_equal(tx["amount"], amount) | assert_equal(tx["amount"], amount) | ||||
assert_equal(tx["category"], "receive") | assert_equal(tx["category"], "receive") | ||||
assert_equal(tx["label"], self.label) | assert_equal(tx["label"], self.label) | ||||
assert_equal(tx["txid"], txid) | assert_equal(tx["txid"], txid) | ||||
assert_equal(tx["confirmations"], confirmations) | assert_equal(tx["confirmations"], confirmations) | ||||
assert_equal("trusted" not in tx, True) | assert_equal("trusted" not in tx, True) | ||||
# Verify the transaction is correctly marked watchonly depending on | # Verify the transaction is correctly marked watchonly depending on | ||||
▲ Show 20 Lines • Show All 107 Lines • Show Last 20 Lines |