aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go')
-rw-r--r--vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go
index faadbe9bd..0e5a1fbdb 100644
--- a/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go
+++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go
@@ -1015,8 +1015,11 @@ func (con *Consensus) pullRandomness() {
case <-time.After(1500 * time.Millisecond):
// TODO(jimmy): pulling period should be related to lambdaBA.
hashes := con.ccModule.pendingBlocksWithoutRandomness()
- con.logger.Debug("Calling Network.PullRandomness", "blocks", hashes)
- con.network.PullRandomness(hashes)
+ if len(hashes) > 0 {
+ con.logger.Debug(
+ "Calling Network.PullRandomness", "blocks", hashes)
+ con.network.PullRandomness(hashes)
+ }
}
}
}