Skip to content

Commit

Permalink
fix vs.yaml parse
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantani committed Oct 21, 2024
1 parent 1ae560f commit 8c4b31c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/types/validator_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ type validatorSetFile struct {
ProposerPriority string `yaml:"proposer_priority"`
VotingPower string `yaml:"voting_power"`
PubKey struct {
Type string `yaml:"type"`
Value string `yaml:"value"`
Type string `yaml:"@type"`
Key string `yaml:"key"`
} `yaml:"pub_key"`
} `yaml:"validators"`
}
Expand Down Expand Up @@ -53,7 +53,7 @@ func ParseValidatorSetFromFile(filePath string) (vs ValidatorSet, err error) {
if err != nil {
return vs, errors.Wrapf(err, "invalid validator %d voting power", i)
}
vs.Validators = append(vs.Validators, NewValidator(v.PubKey.Value, proposerPriority, votingPower))
vs.Validators = append(vs.Validators, NewValidator(v.PubKey.Key, proposerPriority, votingPower))
}

return
Expand Down

0 comments on commit 8c4b31c

Please sign in to comment.