Skip to content

Commit

Permalink
Merge pull request ethereum#193 from XinFinOrg/xin-250
Browse files Browse the repository at this point in the history
xin-250 skip process message whenever synchronising
  • Loading branch information
wjrjerome authored Oct 15, 2022
2 parents 55d9946 + 30d7958 commit e8e9b2e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions eth/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand Down

0 comments on commit e8e9b2e

Please sign in to comment.