BaseClient.py 文件源码

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

项目:cscoins 作者: BrandonWade 项目源码 文件源码
def submit(self, nonce):

        command = {'command': 'submission', 'args': {'nonce': nonce, 'wallet_id': self.wallet_id}}
        message = json.dumps(command)
        await self.socket.send(message)

        message = await self.socket.recv()
        response = json.loads(message)

        print("Submission result: {0}".format(response))

        if 'error' in response:
            print("Error during submission : {0}".format(response["error"]))

        if 'challenge_name' in response:
            # we got a new challenge
            challenge = Challenge()
            challenge.fill_from_challenge(response)

            return challenge
        return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号