def _init_next_address(self, increment=False):
        """ find next unused bip32 address, update state """
        r = self.dashrpc._proxy
        index = int(self._index_state())
        if increment:
            index += 1
        unused_found = False
        while (not unused_found):
            addr = self.get_bip32_address_info(index)
            if 0 > addr['received']:
                index += 1
                continue
            unused_found = True
        r.importaddress(addr['addr'], 'bip-'+str(index), False)
        self._index_state(index)
        self.next_address = addr
dataset/ETHPy150Open moocowmoo/dashvend/bin/dashvend/addresses.py/Bip32Chain._init_next_address/swapped operands of `>`