using BlsVerificationStr instead of hard-coded string

pull/1946/head
Ganesha Upadhyaya 5 years ago
parent dafe876746
commit fcbf78a9d6
  1. 3
      staking/types/validator.go

@ -24,6 +24,7 @@ const (
MaxWebsiteLength = 140 MaxWebsiteLength = 140
MaxSecurityContactLength = 140 MaxSecurityContactLength = 140
MaxDetailsLength = 280 MaxDetailsLength = 280
BlsVerificationStr = "harmony-one"
) )
var ( var (
@ -258,7 +259,7 @@ func verifyBLSKey(pubKey shard.BlsPublicKey, pubKeySig shard.BlsSignature) error
return err return err
} }
messageBytes := []byte("harmony-one") messageBytes := []byte(BlsVerificationStr)
msgHash := hash.Keccak256(messageBytes) msgHash := hash.Keccak256(messageBytes)
if !msgSig.VerifyHash(blsPubKey, msgHash[:]) { if !msgSig.VerifyHash(blsPubKey, msgHash[:]) {
return errBLSKeysNotMatchSigs return errBLSKeysNotMatchSigs

Loading…
Cancel
Save