From 248fdaa5ccca535ddce93173f2f0f3bc60b9381d Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Fri, 2 Nov 2018 12:04:20 +0800 Subject: Rename import due to dexon-consensus rename --- .../dexon-foundation/dexon-consensus/common/utils.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 vendor/github.com/dexon-foundation/dexon-consensus/common/utils.go (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/common/utils.go') 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 +} -- cgit v1.2.3