From fac6bcd19e76d62932da794390f7c5905c0c1bc5 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 23 May 2018 22:42:33 -0400 Subject: [PATCH] consolidate util.go and pubkey.go to validator.go --- types/pubkey.go | 16 ---------------- types/{util.go => validator.go} | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 16 deletions(-) delete mode 100644 types/pubkey.go rename types/{util.go => validator.go} (85%) diff --git a/types/pubkey.go b/types/pubkey.go deleted file mode 100644 index e5cd5fbf3..000000000 --- a/types/pubkey.go +++ /dev/null @@ -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, - } -} diff --git a/types/util.go b/types/validator.go similarity index 85% rename from types/util.go rename to types/validator.go index 0924ab5ff..e443a3361 100644 --- a/types/util.go +++ b/types/validator.go @@ -8,6 +8,21 @@ import ( 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