Пример #1
0
        """
        Create a client.
        """
        clientName = "my_client_id"
        client = Client(name=clientName,
                        ha=client_addr,
                        nodeReg=cliNodeReg,
                        basedirpath=tmpdir)
        looper.add(client)

        """
        A client signs its requests. By default, a simple yet secure signing
        mechanism is created for a client.
        """
        idAndKey = client.getSigner().identifier, client.getSigner().verkey

        """
        A client's signature verification key must be bootstrapped out of band
        into the consensus pool. For demonstration, we'll add it directly to
        each node.
        """
        for node in alpha, beta, gamma, delta:
            node.clientAuthNr.addClient(*idAndKey)

        """
        We give the client a little time to connect
        """
        looper.runFor(3)

        """