From 648124eb405a11e258fd5f89ae4931e8d4907092 Mon Sep 17 00:00:00 2001 From: "Kieran R. Prasch" Date: Sun, 26 May 2019 12:19:57 -0700 Subject: [PATCH] Remove maximum stake duration validation --- nucypher/blockchain/eth/token.py | 3 --- nucypher/cli/types.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/nucypher/blockchain/eth/token.py b/nucypher/blockchain/eth/token.py index 5b67dd0c8..2788b410d 100644 --- a/nucypher/blockchain/eth/token.py +++ b/nucypher/blockchain/eth/token.py @@ -286,9 +286,6 @@ class Stake: 'Stake duration of ({duration}) is too short; must be at least {minimum} periods.' .format(minimum=self.economics.minimum_locked_periods, duration=self.duration)), - (self.economics.maximum_locked_periods >= self.duration, - 'Stake duration of ({duration}) is too long; must be no more than {maximum} periods.' - .format(maximum=self.economics.maximum_locked_periods, duration=self.duration)), ) if raise_on_fail is True: diff --git a/nucypher/cli/types.py b/nucypher/cli/types.py index f2c1283c7..78363cdf1 100644 --- a/nucypher/cli/types.py +++ b/nucypher/cli/types.py @@ -49,7 +49,7 @@ class IPv4Address(click.ParamType): token_economics = TokenEconomics() # Staking -STAKE_DURATION = click.IntRange(min=token_economics.minimum_locked_periods, max=token_economics.maximum_locked_periods, clamp=False) +STAKE_DURATION = click.IntRange(min=token_economics.minimum_locked_periods, clamp=False) STAKE_EXTENSION = click.IntRange(min=1, max=token_economics.maximum_allowed_locked, clamp=False) STAKE_VALUE = click.IntRange(min=NU(token_economics.minimum_allowed_locked, 'NuNit').to_tokens(), max=NU(token_economics.maximum_allowed_locked, 'NuNit').to_tokens(), clamp=False)