aboutsummaryrefslogtreecommitdiffstats
path: root/simulation
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-10-08 15:30:53 +0800
committerGitHub <noreply@github.com>2018-10-08 15:30:53 +0800
commit97abfdabfd41b44f3273a869eca75cea34b0fdc8 (patch)
treec5e2939bc6a363bc179a762f1079973219fa65b7 /simulation
parent02f8296bf9ec5069ff26e39216c7e7af7c6e9567 (diff)
downloaddexon-consensus-97abfdabfd41b44f3273a869eca75cea34b0fdc8.tar
dexon-consensus-97abfdabfd41b44f3273a869eca75cea34b0fdc8.tar.gz
dexon-consensus-97abfdabfd41b44f3273a869eca75cea34b0fdc8.tar.bz2
dexon-consensus-97abfdabfd41b44f3273a869eca75cea34b0fdc8.tar.lz
dexon-consensus-97abfdabfd41b44f3273a869eca75cea34b0fdc8.tar.xz
dexon-consensus-97abfdabfd41b44f3273a869eca75cea34b0fdc8.tar.zst
dexon-consensus-97abfdabfd41b44f3273a869eca75cea34b0fdc8.zip
core: Add block randomness in compaction-chain module (#179)
Diffstat (limited to 'simulation')
-rw-r--r--simulation/app.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/simulation/app.go b/simulation/app.go
index a46f3a6..e88f956 100644
--- a/simulation/app.go
+++ b/simulation/app.go
@@ -126,6 +126,9 @@ func (a *simApp) TotalOrderingDelivered(blockHashes common.Hashes, early bool) {
// BlockDelivered is called when a block in compaction chain is delivered.
func (a *simApp) BlockDelivered(block types.Block) {
+ if len(block.Randomness) == 0 {
+ panic(fmt.Errorf("Block %s randomness is empty", block.Hash))
+ }
func() {
a.blockByHashMutex.Lock()
defer a.blockByHashMutex.Unlock()