consolidate util.go and pubkey.go to validator.go

This commit is contained in:
Ethan Buchman
2018-05-23 22:42:33 -04:00
parent 3d4f3bbbdd
commit fac6bcd19e
2 changed files with 15 additions and 16 deletions

View File

@ -1,16 +0,0 @@
package types
const (
PubKeyEd25519 = "ed25519"
)
func Ed25519Validator(pubkey []byte, power int64) Validator {
return Validator{
// Address:
PubKey: PubKey{
Type: PubKeyEd25519,
Data: pubkey,
},
Power: power,
}
}

View File

@ -8,6 +8,21 @@ import (
cmn "github.com/tendermint/tmlibs/common" cmn "github.com/tendermint/tmlibs/common"
) )
const (
PubKeyEd25519 = "ed25519"
)
func Ed25519Validator(pubkey []byte, power int64) Validator {
return Validator{
// Address:
PubKey: PubKey{
Type: PubKeyEd25519,
Data: pubkey,
},
Power: power,
}
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Validators is a list of validators that implements the Sort interface // Validators is a list of validators that implements the Sort interface