コード例 #1
0
ファイル: testMessages.py プロジェクト: RinatGumarov/korum
def getValidRes():
    r = Result()
    r.liability = validResDict['liability']
    r.result = validResDict['result']
    r.success = validResDict['success']
    r.signature = unhexlify(validResDict['signature'].encode('utf-8'))
    return r
コード例 #2
0
def dict2res(m):
    msg = Result()
    msg.liability = m['liability']
    msg.result = m['result']
    msg.success = m['success']
    msg.signature = unhexlify(m['signature'].encode('utf-8'))
    return msg
コード例 #3
0
def dict2res(m):
    msg = Result()

    msg.liability = Address()
    msg.liability.address = m['liability']

    msg.result = Multihash()
    msg.result.multihash = m['result']

    msg.success = m['success']
    msg.signature = unhexlify(m['signature'].encode('utf-8'))
    return msg