user.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:sodogetip 作者: just-an-dev 项目源码 文件源码
def get_balance(self, failover_time=None):
        balance = 0
        if self.is_registered():

            # get confirmed balance
            balance = float(self.get_balance_confirmed())

            # get unconfirmed balance come of bot
            balance += float(crypto.get_user_spendable_balance(self.address))

            if failover_time is not None and type(failover_time) is type(multiprocessing.Value):
                # if we call function without failover_time, we consider we are in safe mode
                if int(time.time()) > int(failover_time.value) + 86400:
                    # not in safe mode so add unconfirmed balance
                    balance += float(self.get_balance_unconfirmed())

        return balance
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号