Skip to content

Commit

Permalink
Merge branch 'grarco/float-localnet-script' (#2413)
Browse files Browse the repository at this point in the history
* grarco/float-localnet-script:
  Rounds epoch_length in localnet script to prevent generating a float
  • Loading branch information
brentstone committed Apr 29, 2024
2 parents e4a44c3 + 5d302b0 commit 7ee287c
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 7ee287c

Please sign in to comment.