diff options
| author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-03-10 17:59:17 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-10 17:59:17 +0800 |
| commit | 4345050093710739c9e417956bc3a8339e7d99a6 (patch) | |
| tree | 24fe4e21b95605f8854f6be073a762ece294d479 /core/consensus.go | |
| parent | ac3187e706bc11f1b36e32015a6e51a96cc8cfe9 (diff) | |
| download | dexon-consensus-4345050093710739c9e417956bc3a8339e7d99a6.tar dexon-consensus-4345050093710739c9e417956bc3a8339e7d99a6.tar.gz dexon-consensus-4345050093710739c9e417956bc3a8339e7d99a6.tar.bz2 dexon-consensus-4345050093710739c9e417956bc3a8339e7d99a6.tar.lz dexon-consensus-4345050093710739c9e417956bc3a8339e7d99a6.tar.xz dexon-consensus-4345050093710739c9e417956bc3a8339e7d99a6.tar.zst dexon-consensus-4345050093710739c9e417956bc3a8339e7d99a6.zip | |
core: reduce blockrandomness message (#477)
* core: reduce blockchain randomness msg
* add test
Diffstat (limited to 'core/consensus.go')
| -rw-r--r-- | core/consensus.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/consensus.go b/core/consensus.go index 050bfe7..5945406 100644 --- a/core/consensus.go +++ b/core/consensus.go @@ -1070,6 +1070,9 @@ func (con *Consensus) ProcessBlockRandomnessResult( if rand.Position.Round == 0 { return nil } + if !con.bcModule.shouldAddRandomness(rand) { + return nil + } if err := con.bcModule.addRandomness(rand); err != nil { return err } |
