only propose crosslinks after staking epoch

pull/1982/head
Rongjian Lan 5 years ago
parent c6e527f086
commit 16a6cf9f55
  1. 2
      node/node_newblock.go

@ -127,7 +127,7 @@ func (node *Node) proposeNewBlock() (*types.Block, error) {
// Prepare cross links
var crossLinksToPropose types.CrossLinks
if node.NodeConfig.ShardID == 0 {
if node.NodeConfig.ShardID == 0 && node.Blockchain().Config().IsStaking(node.Worker.GetCurrentHeader().Epoch()) {
node.pendingCLMutex.Lock()
allPending, err := node.Blockchain().ReadPendingCrossLinks()
node.pendingCLMutex.Unlock()

Loading…
Cancel
Save