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
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
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