Skip to content

Commit

Permalink
initializes fee and probability w/ none (instead of -1) renepickhardt#20
Browse files Browse the repository at this point in the history
  • Loading branch information
sebulino committed Jun 22, 2022
1 parent ec053db commit 4f78919
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pickhardtpayments/Attempt.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from enum import Enum

import UncertaintyChannel
from pickhardtpayments import Channel


class AttemptStatus(Enum):
Expand All @@ -20,17 +20,17 @@ class Attempt:
Attempt.
An Attempt consists of a list of Channels (class:Channel) and the amount in sats to be sent through this path.
:param path: a list of UncertaintyChannel objects from sender to receiver
:type path: list[UncertaintyChannel]
:param path: a list of Channel objects from sender to receiver
:type path: list[Channel]
:param amount: the amount to be transferred from source to destination
:type amount: int
"""

def __init__(self, path: list[UncertaintyChannel], amount: int = 0):
def __init__(self, path: list[Channel], amount: int = 0):
"""Constructor method
"""
self._routing_fee = -1
self._probability = -1
self._routing_fee = None
self._probability = None
self._path = path
self._status = AttemptStatus.PLANNED
self._amount = amount
Expand All @@ -44,11 +44,11 @@ def __str__(self):
return description

@property
def path(self) -> list[UncertaintyChannel]:
def path(self) -> list[Channel]:
"""Returns the path of the attempt.
:return: the list of UncertaintyChannels that the path consists of
:rtype: list[UncertaintyChannel]
:return: the list of Channels that the path consists of
:rtype: list[Channel]
"""
return self._path

Expand Down

0 comments on commit 4f78919

Please sign in to comment.