def _find_payment(self, msg, txid, txtype):
        addr = None
        value = 0
        refund = 0
        for vout in msg.tx.vout:
            try:
                addr = str(P2PKHBitcoinAddress.from_scriptPubKey(
                    vout.scriptPubKey))
            except CBitcoinAddressError:
                continue
            if addr == self.current_address:
                value = int(vout.nValue)
                break
        # current address received something
        if addr and value:
            # calculate under/overpay refund
            if value < self.vend.cost:
                refund = AmountToJSON(value)
            elif value > self.vend.cost:
                refund = AmountToJSON(value - self.vend.cost)
            if txid not in self.mempool:
                self.mempool[txid] = {}
            # set transaction type, tx refund
            self.mempool[txid][txtype] = True
            if txtype == 'tx':
                tx = self.mempool[txid]['processed']
                tx['refund'] = AmountToJSON(tx['value'])
            self.mempool[txid]['processed'] = {
                "addr": addr,
                "value": value,
                "refund": refund,
                "sale": (value >= self.vend.cost and True or False)
            }
            self.vend.get_next_address(increment=True)
            return True
Tests a simple world fact by asserting that 10*10 is 100.
dataset/ETHPy150Open moocowmoo/dashvend/bin/dashvend/dash_ix.py/InstantX._find_payment--crossover with--dataset/ETHPy150Open bbengfort/confire/tests/__init__.py/InitializationTest.test_initialization