Fix CLI index bounds

`type=click.IntRange(0, 2**32)` got corrected to `type=click.IntRange(0, 2**32 - 1)`

Co-authored-by: Hsiao-Wei Wang <hwwang156@gmail.com>
This commit is contained in:
Carl Beekhuizen 2020-11-03 12:29:47 +01:00 committed by GitHub
parent fe5b539701
commit 741fa62392
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ def validate_mnemonic(cts: click.Context, param: Any, mnemonic: str) -> str:
default=0,
prompt=('Enter the index (key number) you wish to start generating more keys from. '
'For example, if you\'ve generated 4 keys in the past, you\'d enter 4 here,'),
type=click.IntRange(0, 2**32),
type=click.IntRange(0, 2**32 - 1),
)
@generate_keys_arguments_decorator
def existing_mnemonic(ctx: click.Context, mnemonic: str, mnemonic_password: str, **kwargs: Any) -> None:

View File

@ -32,7 +32,7 @@ def generate_keys_arguments_decorator(function: Callable[..., Any]) -> Callable[
'--num_validators',
prompt='Please choose how many validators you wish to run',
required=True,
type=click.IntRange(0, 2**32),
type=click.IntRange(0, 2**32 - 1),
),
click.option(
'--folder',