def create_chainlock(self, height, blockHash):
    request_id = ('%064x' % uint256_from_str(hash256((ser_string(b'clsig') + struct.pack('<I', height)))))
    message_hash = ('%064x' % blockHash)
    for mn in self.mninfo:
        mn.node.quorum('sign', 100, request_id, message_hash)
    recSig = None
    t = time()
    while ((time() - t) < 10):
        try:
            recSig = self.nodes[0].quorum('getrecsig', 100, request_id, message_hash)
            break
        except:
            sleep(0.1)
    assert (recSig is not None)
    clsig = msg_clsig(height, blockHash, hex_str_to_bytes(recSig['sig']))
    return clsig
def create_chainlock(self, height, blockHash):
    request_id = ('%064x' % uint256_from_str(hash256((ser_string(b'clsig') + struct.pack('<I', height)))))
    message_hash = ('%064x' % blockHash)
    for mn in self.mninfo:
        mn.node.quorum('sign', 100, request_id, message_hash)
    recSig = None
    t = time()
    while ((time() - t) < 10):
        try:
            recSig = self.nodes[0].quorum('getrecsig', 100, request_id, message_hash)
            break
        except:
            sleep(0.1)
    assert (recSig is not None)
    clsig = msg_clsig(height, blockHash, hex_str_to_bytes(recSig['sig']))
    return clsig