Skip to content

Commit

Permalink
Minor Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ukane-philemon committed Dec 21, 2021
1 parent aa729f9 commit e57cb04
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions vspd.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020 The Decred developers
// Copyright (c) 2021 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

Expand Down Expand Up @@ -87,15 +87,17 @@ func run(ctx context.Context) error {

//Ensure adminpass option is set
if cfg.AdminPass == "" && err != nil {
return errors.New("the adminpass option is not set")
log.Error("Config error: the adminpass option is not set")
return err
}

if cfg.AdminPass != "" {
//Hash the cfg.AdminPass value
cfg.AdminPass, err = hashPassword(cfg.AdminPass)

if err != nil {
return fmt.Errorf("Hashing AdminPass Failed: %w", err)
log.Errorf("Hashing AdminPass Failed: %v", err)
return err
}

//if adminpass is set, overwrite the saved adminpass hash in database.
Expand Down

0 comments on commit e57cb04

Please sign in to comment.