diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-11-02 12:04:20 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:52 +0800 |
commit | 8e367a13fe30a6a63880ef4d031b7f6c153cf5f0 (patch) | |
tree | a88f84c84b735c95fb22f03e3207a085d6edf36a /vendor/github.com/dexon-foundation/dexon-consensus/common/utils.go | |
parent | b1172dab3b91335729325f3effe48688418129d1 (diff) | |
download | go-tangerine-8e367a13fe30a6a63880ef4d031b7f6c153cf5f0.tar go-tangerine-8e367a13fe30a6a63880ef4d031b7f6c153cf5f0.tar.gz go-tangerine-8e367a13fe30a6a63880ef4d031b7f6c153cf5f0.tar.bz2 go-tangerine-8e367a13fe30a6a63880ef4d031b7f6c153cf5f0.tar.lz go-tangerine-8e367a13fe30a6a63880ef4d031b7f6c153cf5f0.tar.xz go-tangerine-8e367a13fe30a6a63880ef4d031b7f6c153cf5f0.tar.zst go-tangerine-8e367a13fe30a6a63880ef4d031b7f6c153cf5f0.zip |
Rename import due to dexon-consensus rename
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/common/utils.go')
-rw-r--r-- | vendor/github.com/dexon-foundation/dexon-consensus/common/utils.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/common/utils.go b/vendor/github.com/dexon-foundation/dexon-consensus/common/utils.go new file mode 100644 index 000000000..7e89c059d --- /dev/null +++ b/vendor/github.com/dexon-foundation/dexon-consensus/common/utils.go @@ -0,0 +1,14 @@ +package common + +import ( + "math/rand" +) + +// NewRandomHash returns a random Hash-like value. +func NewRandomHash() Hash { + x := Hash{} + for i := 0; i < HashLength; i++ { + x[i] = byte(rand.Int() % 256) + } + return x +} |