Browse Source

Fix issue 7782 (#7783)

Co-authored-by: Simon Kirillov <skirillov@wallarm.com>
Co-authored-by: Sam Kleinman <garen@tychoish.com>
wb/fix-pbts-params
Simon Kirillov 3 years ago
committed by GitHub
parent
commit
1fbe56da0c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 7 deletions
  1. +4
    -5
      cmd/tendermint/commands/init.go
  2. +2
    -2
      cmd/tendermint/commands/testnet.go

+ 4
- 5
cmd/tendermint/commands/init.go View File

@ -30,7 +30,7 @@ func MakeInitFilesCommand(conf *config.Config, logger log.Logger) *cobra.Command
return errors.New("must specify a node type: tendermint init [validator|full|seed]") return errors.New("must specify a node type: tendermint init [validator|full|seed]")
} }
conf.Mode = args[0] conf.Mode = args[0]
return initFilesWithConfig(cmd.Context(), conf, logger)
return initFilesWithConfig(cmd.Context(), conf, logger, keyType)
}, },
} }
@ -40,11 +40,10 @@ func MakeInitFilesCommand(conf *config.Config, logger log.Logger) *cobra.Command
return cmd return cmd
} }
func initFilesWithConfig(ctx context.Context, conf *config.Config, logger log.Logger) error {
func initFilesWithConfig(ctx context.Context, conf *config.Config, logger log.Logger, keyType string) error {
var ( var (
pv *privval.FilePV
err error
keyType string
pv *privval.FilePV
err error
) )
if conf.Mode == config.ModeValidator { if conf.Mode == config.ModeValidator {


+ 2
- 2
cmd/tendermint/commands/testnet.go View File

@ -138,7 +138,7 @@ Example:
return err return err
} }
if err := initFilesWithConfig(ctx, config, logger); err != nil {
if err := initFilesWithConfig(ctx, config, logger, keyType); err != nil {
return err return err
} }
@ -180,7 +180,7 @@ Example:
return err return err
} }
if err := initFilesWithConfig(ctx, conf, logger); err != nil {
if err := initFilesWithConfig(ctx, conf, logger, keyType); err != nil {
return err return err
} }
} }


Loading…
Cancel
Save