Merge pull request #193 from XinFinOrg/xin-250

xin-250 skip process message whenever synchronising
This commit is contained in:
Jerome 2022-10-16 10:19:25 +11:00 committed by GitHub
commit e8e9b2e121
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -849,8 +849,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
pm.lendingpool.AddRemotes(txs)
}
case msg.Code == VoteMsg:
// VoteMsg arrived, make sure we have a valid and fresh chain to handle them
if atomic.LoadUint32(&pm.acceptTxs) == 0 {
if pm.downloader.Synchronising() {
break
}
@ -868,8 +867,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
}
case msg.Code == TimeoutMsg:
// TimeoutMsg arrived, make sure we have a valid and fresh chain to handle them
if atomic.LoadUint32(&pm.acceptTxs) == 0 {
if pm.downloader.Synchronising() {
break
}
@ -888,8 +886,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
}
case msg.Code == SyncInfoMsg:
// SyncInfoMsg arrived, make sure we have a valid and fresh chain to handle them
if atomic.LoadUint32(&pm.acceptTxs) == 0 {
if pm.downloader.Synchronising() {
break
}