pull/69/head
Minh Doan 6 years ago
parent c097113ca5
commit 2d46c18170
  1. 6
      node/node.go

@ -212,11 +212,8 @@ TASK_LOOP:
bc := &blockchain.Blockchain{
Blocks: make([]*blockchain.Block, blockSize),
}
// loop to do syncing.
for {
var wg sync.WaitGroup
wg.Add(activePeerNumber)
wg.Add(activePeerNumber)
for _, configPeer := range syncConfig.peers {
if configPeer.err != nil {
continue
@ -246,7 +243,6 @@ TASK_LOOP:
}(&configPeer, taskSyncQueue, bc)
}
wg.Wait()
}
return bc
}

Loading…
Cancel
Save