def check(self, txid=None, amount=None, confirmations=None):
    'Verify that getbalance/listtransactions return expected values.'
    balance = self.node.getbalance(self.label, 0, False, True)
    assert_equal(balance, self.expected_balance)
    txs = self.node.listtransactions(self.label, 10000, 0, True)
    assert_equal(len(txs), self.expected_txs)
    if (txid is not None):
        (tx,) = [tx for tx in txs if (tx['txid'] == txid)]
        assert_equal(tx['account'], self.label)
        assert_equal(tx['address'], self.address['address'])
        assert_equal(tx['amount'], amount)
        assert_equal(tx['category'], 'receive')
        assert_equal(tx['label'], self.label)
        assert_equal(tx['txid'], txid)
        assert_equal(tx['confirmations'], confirmations)
        assert_equal(('trusted' not in tx), True)
        if (self.data != Data.priv):
            assert_equal(tx['involvesWatchonly'], True)
        else:
            assert_equal(('involvesWatchonly' not in tx), True)
Verify that getbalance/listtransactions return expected values.
def check(self, txid=None, amount=None, confirmations=None):
    
    balance = self.node.getbalance(self.label, 0, False, True)
    assert_equal(balance, self.expected_balance)
    txs = self.node.listtransactions(self.label, 10000, 0, True)
    assert_equal(len(txs), self.expected_txs)
    if (txid is not None):
        (tx,) = [tx for tx in txs if (tx['txid'] == txid)]
        assert_equal(tx['account'], self.label)
        assert_equal(tx['address'], self.address['address'])
        assert_equal(tx['amount'], amount)
        assert_equal(tx['category'], 'receive')
        assert_equal(tx['label'], self.label)
        assert_equal(tx['txid'], txid)
        assert_equal(tx['confirmations'], confirmations)
        assert_equal(('trusted' not in tx), True)
        if (self.data != Data.priv):
            assert_equal(tx['involvesWatchonly'], True)
        else:
            assert_equal(('involvesWatchonly' not in tx), True)