How to use the iroha.helper.logger function in iroha

To help you get started, we’ve selected a few iroha examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hyperledger / iroha-python / tests / test_creator.py View on Github external
def setUp(self):
        logger.setDebug()
        logger.info("CreatorTest")
github hyperledger / iroha-python / tests / helper / test_random.py View on Github external
def test_random(self):
        a = random.uuid(10)
        self.assertTrue(len(a),10)
        b = random.uuid(53)
        self.assertTrue(len(b),53)
        logger.debug(a)
        logger.debug(b)
github hyperledger / iroha-python / tests / query / test_response.py View on Github external
def setUp(self):
        logger.setInfo()
        logger.info("RequestTest")
        self.keypair = crypto.create_key_pair()
github hyperledger / iroha-python / iroha / transaction / transaction.py View on Github external
def add_command(self,cmd):
        """
        Add Command to this transaction
        Args:
            cmd( `CreateAccount`,`AddSignatory`,`RemoveSignatory`,`CreateDomain`,`CreateAsset`,
                `AddAssetQuantity`,`SetAccountQuorum` or `TransferAsset` ): command of protobuf structre.

        """
        logger.debug("add_command")
        self.tx.payload.commands.extend(
            [helper_command.wrap_cmd(cmd)]
        )
github hyperledger / iroha-python / iroha / query / query.py View on Github external
def __init__(self):
        logger.debug("Create Query Construct")
        self.query = QuerySchema(
            payload = QuerySchema.Payload(
                created_time = crypto.now()
            )
            # TODO query has signature
        )
        self.signatories = Signatories()
github hyperledger / iroha-python / iroha / primitive / amount.py View on Github external
def amount2int(amount):
    """
    Translater Protobuf Amount -> python int type

    Args:
        amount ( `Amount` ) : protobuf amount type ( don't care precision )

    Returns:
        int: int value equal to arg amount.

    """
    logger.debug("amount2int")
    res = int(0)
    res += int(amount.value.first)
    res *= UINT64_NUMBER
    logger.debug(res)
    res += int(amount.value.second)
    res *= UINT64_NUMBER
    logger.debug(res)
    res += int(amount.value.third)
    res *= UINT64_NUMBER
    logger.debug(res)
    res += int(amount.value.fourth)
    return res
github hyperledger / iroha-python / iroha / creator.py View on Github external
def create_query(self):
        """
        Create Query

        Returns:
            `Query`: created query with added account_id, tima stamp, and connection.

        """
        logger.debug("Creator.create_query")
        retq = Query()
        if self.connection:
            retq.set_connection(self.connection)
        if self.creator_account_id:
            retq.set_creator_account_id(self.creator_account_id)
        # TODO It has not deceided yet
        retq.set_query_counter(0)
        retq.time_stamp()
        return retq
github hyperledger / iroha-python / iroha / query / response.py View on Github external
def __init__(self,query_response):
        logger.debug("Create Response Construct")
        self.response = query_response