diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-11-02 12:04:20 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:17 +0800 |
commit | 248fdaa5ccca535ddce93173f2f0f3bc60b9381d (patch) | |
tree | ea99eebff0db5294e222adc7920f8a5f47a7c2ba /vendor/github.com/dexon-foundation/dexon-consensus/common/utils.go | |
parent | 7ef2bd6a1544d3b92cf2b2119935b425279b4e59 (diff) | |
download | go-tangerine-248fdaa5ccca535ddce93173f2f0f3bc60b9381d.tar go-tangerine-248fdaa5ccca535ddce93173f2f0f3bc60b9381d.tar.gz go-tangerine-248fdaa5ccca535ddce93173f2f0f3bc60b9381d.tar.bz2 go-tangerine-248fdaa5ccca535ddce93173f2f0f3bc60b9381d.tar.lz go-tangerine-248fdaa5ccca535ddce93173f2f0f3bc60b9381d.tar.xz go-tangerine-248fdaa5ccca535ddce93173f2f0f3bc60b9381d.tar.zst go-tangerine-248fdaa5ccca535ddce93173f2f0f3bc60b9381d.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 +} |