Merge pull request #1540 from chaosma/master

lower down to 15% of ratio to receipts broadcast
pull/1545/head
chaosma 5 years ago committed by GitHub
commit 25a6aea748
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      node/node_handler.go

@ -386,10 +386,10 @@ func (node *Node) PostConsensusProcessing(newBlock *types.Block, commitSigAndBit
// Print to normal log too // Print to normal log too
utils.GetLogInstance().Info("BINGO !!! Reached Consensus", "BlockNum", newBlock.NumberU64()) utils.GetLogInstance().Info("BINGO !!! Reached Consensus", "BlockNum", newBlock.NumberU64())
// 30% of the validator also need to do broadcasting // 15% of the validator also need to do broadcasting
rand.Seed(time.Now().UTC().UnixNano()) rand.Seed(time.Now().UTC().UnixNano())
rnd := rand.Intn(100) rnd := rand.Intn(100)
if rnd < 30 { if rnd < 15 {
node.BroadcastCXReceipts(newBlock, commitSigAndBitmap) node.BroadcastCXReceipts(newBlock, commitSigAndBitmap)
} }
} }

Loading…
Cancel
Save