Skip to content

Commit

Permalink
Rounds epoch_length in localnet script to prevent generating a float
Browse files Browse the repository at this point in the history
  • Loading branch information
grarco authored and brentstone committed Apr 24, 2024
1 parent 97ec5b4 commit 5d302b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/gen_localnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def edit_parameters(params_toml, **kwargs):
if args.max_validator_slots:
params['pos_params'] = {'max_validator_slots': args.max_validator_slots}
if args.epoch_length:
epochs_per_year = 365 * 24 * 60 * 60 / args.epoch_length
epochs_per_year = round(365 * 24 * 60 * 60 / args.epoch_length)
params['parameters'] = {'epochs_per_year': epochs_per_year }
if len(params.keys())>0:
edit_parameters(localnet_dir + '/parameters.toml', **params)
Expand Down

0 comments on commit 5d302b0

Please sign in to comment.