diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-02-22 13:14:55 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:57 +0800 |
commit | 11e2de8c43f867764d4dd1146d467cb6e9bf114b (patch) | |
tree | fb821d64098f7c62dabf879f9edfc4490b033a58 /vendor/github.com/dexon-foundation/dexon-consensus/common | |
parent | af12f1f869609d2f3acf27c9315b6bbe816d9761 (diff) | |
download | dexon-11e2de8c43f867764d4dd1146d467cb6e9bf114b.tar dexon-11e2de8c43f867764d4dd1146d467cb6e9bf114b.tar.gz dexon-11e2de8c43f867764d4dd1146d467cb6e9bf114b.tar.bz2 dexon-11e2de8c43f867764d4dd1146d467cb6e9bf114b.tar.lz dexon-11e2de8c43f867764d4dd1146d467cb6e9bf114b.tar.xz dexon-11e2de8c43f867764d4dd1146d467cb6e9bf114b.tar.zst dexon-11e2de8c43f867764d4dd1146d467cb6e9bf114b.zip |
core: Remove K, Phi and NumChains from Governance (#198)
* change default sync_core.sh
* vendor: sync to latest core
* core: Remove K, Phi and NumChain
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/common')
-rw-r--r-- | vendor/github.com/dexon-foundation/dexon-consensus/common/utils.go | 10 |
1 files changed, 10 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 index 63d25a3fc..e46b3e9c9 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus/common/utils.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus/common/utils.go @@ -19,3 +19,13 @@ func NewRandomHash() Hash { } return x } + +// GenerateRandomBytes generates bytes randomly. +func GenerateRandomBytes() []byte { + randomness := make([]byte, 32) + _, err := rand.Read(randomness) + if err != nil { + panic(err) + } + return randomness +} |