Esempio n. 1
0
    def get_transactions_to_approve(self, depth, reference=None):
        # type: (int, Optional[TransactionHash]) -> dict
        """
        Tip selection which returns ``trunkTransaction`` and
        ``branchTransaction``.

        :param depth:
          Determines how many bundles to go back to when finding the
          transactions to approve.

          The higher the depth value, the more "babysitting" the node
          will perform for the network (as it will confirm more
          transactions that way).

        :param reference:
          Transaction hash from which to start the weighted random walk.
          Use this parameter to make sure the returned tip transaction hashes
          approve a given reference transaction.

        References:

        - https://docs.iota.org/docs/node-software/0.1/iri/references/api-reference#gettransactionstoapprove
        """
        return core.GetTransactionsToApproveCommand(self.adapter)(
            depth=depth,
            reference=reference,
        )
Esempio n. 2
0
    def get_transactions_to_approve(self, depth):
        # type: (int) -> dict
        """
    Tip selection which returns ``trunkTransaction`` and
    ``branchTransaction``.

    :param depth:
      Determines how many bundles to go back to when finding the
      transactions to approve.

      The higher the depth value, the more "babysitting" the node will
      perform for the network (as it will confirm more transactions
      that way).

    References:
      - https://iota.readme.io/docs/gettransactionstoapprove
    """
        return core.GetTransactionsToApproveCommand(self.adapter)(depth=depth)