Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #200 from redondo-mk/195_default_depth_value
Browse files Browse the repository at this point in the history
Setting default value for depth to 3
  • Loading branch information
todofixthis committed Jul 24, 2018
2 parents 292c4ce + 11b727e commit 2fa8c0d
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions iota/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ def prepare_transfer(
def promote_transaction(
self,
transaction,
depth,
depth=3,
min_weight_magnitude=None,
):
# type: (TransactionHash, int, Optional[int]) -> dict
Expand All @@ -921,7 +921,7 @@ def promote_transaction(
def replay_bundle(
self,
transaction,
depth,
depth=3,
min_weight_magnitude=None,
):
# type: (TransactionHash, int, Optional[int]) -> dict
Expand All @@ -935,6 +935,7 @@ def replay_bundle(
:param depth:
Depth at which to attach the bundle.
Defaults to 3.
:param min_weight_magnitude:
Min weight magnitude, used by the node to calibrate Proof of
Expand Down Expand Up @@ -965,8 +966,8 @@ def replay_bundle(

def send_transfer(
self,
depth, # type: int
transfers, # type: Iterable[ProposedTransaction]
depth=3, # type: int
inputs=None, # type: Optional[Iterable[Address]]
change_address=None, # type: Optional[Address]
min_weight_magnitude=None, # type: Optional[int]
Expand All @@ -978,12 +979,13 @@ def send_transfer(
attaches the bundle to the Tangle, and broadcasts and stores the
transactions.
:param depth:
Depth at which to attach the bundle.
:param transfers:
Transfers to include in the bundle.
:param depth:
Depth at which to attach the bundle.
Defaults to 3.
:param inputs:
List of inputs used to fund the transfer.
Not needed for zero-value transfers.
Expand Down Expand Up @@ -1035,7 +1037,7 @@ def send_transfer(
securityLevel=security_level,
)

def send_trytes(self, trytes, depth, min_weight_magnitude=None):
def send_trytes(self, trytes, depth=3, min_weight_magnitude=None):
# type: (Iterable[TransactionTrytes], int, Optional[int]) -> dict
"""
Attaches transaction trytes to the Tangle, then broadcasts and
Expand All @@ -1046,6 +1048,7 @@ def send_trytes(self, trytes, depth, min_weight_magnitude=None):
:param depth:
Depth at which to attach the bundle.
Defaults to 3.
:param min_weight_magnitude:
Min weight magnitude, used by the node to calibrate Proof of
Expand Down

0 comments on commit 2fa8c0d

Please sign in to comment.