mirror of https://github.com/poanetwork/quorum.git
permissions: changes to check for node syncing before starting permissions
This commit is contained in:
parent
385a2334d8
commit
2716937f2e
|
@ -352,6 +352,7 @@ func (d *Downloader) synchronise(id string, hash common.Hash, td *big.Int, mode
|
|||
if !atomic.CompareAndSwapInt32(&d.synchronising, 0, 1) {
|
||||
return errBusy
|
||||
}
|
||||
// changes for permissions. added set sync status to indicate permisssions that node sync has started
|
||||
types.SetSyncStatus()
|
||||
defer atomic.StoreInt32(&d.synchronising, 0)
|
||||
|
||||
|
|
|
@ -277,6 +277,8 @@ func (pm *ProtocolManager) applyRaftSnapshot(raftSnapshot raftpb.Snapshot) {
|
|||
|
||||
log.Info(chainExtensionMessage, "hash", pm.blockchain.CurrentBlock().Hash())
|
||||
} else {
|
||||
// added for permissions changes to indicate node sync up has started
|
||||
types.SetSyncStatus()
|
||||
log.Info("blockchain is caught up; no need to synchronize")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue