diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-09-20 09:09:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-20 09:09:37 +0800 |
commit | 421d72b2d796195178104a0eb1dedf319ba8664c (patch) | |
tree | f32f15c167989905494eca1891c3240b80dac1d6 /core/test/utils.go | |
parent | 37f117d35c6617e1944d45e001e03813a6a278ed (diff) | |
download | dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.gz dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.bz2 dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.lz dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.xz dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.zst dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.zip |
Rename validator* to node* (#120)
Diffstat (limited to 'core/test/utils.go')
-rw-r--r-- | core/test/utils.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/test/utils.go b/core/test/utils.go index 138e8a1..887ef14 100644 --- a/core/test/utils.go +++ b/core/test/utils.go @@ -34,11 +34,11 @@ func stableRandomHash(block *types.Block) (common.Hash, error) { return common.NewRandomHash(), nil } -// GenerateRandomValidatorIDs generates randomly a slices of types.ValidatorID. -func GenerateRandomValidatorIDs(validatorCount int) (vIDs types.ValidatorIDs) { - vIDs = types.ValidatorIDs{} - for i := 0; i < validatorCount; i++ { - vIDs = append(vIDs, types.ValidatorID{Hash: common.NewRandomHash()}) +// GenerateRandomNodeIDs generates randomly a slices of types.NodeID. +func GenerateRandomNodeIDs(nodeCount int) (nIDs types.NodeIDs) { + nIDs = types.NodeIDs{} + for i := 0; i < nodeCount; i++ { + nIDs = append(nIDs, types.NodeID{Hash: common.NewRandomHash()}) } return } |