Skip to content

Commit

Permalink
nil pointer fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ucwong committed Jul 29, 2019
1 parent ce29dd2 commit 66b2e73
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ctxc/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ func (pm *ProtocolManager) synchronise(peer *peer) {
td := pm.blockchain.GetTd(currentBlock.Hash(), currentBlock.NumberU64())

pHead, pTd := peer.Head()
if pTd == nil {
return
}

if pTd.Cmp(td) <= 0 {
return
}
Expand Down

0 comments on commit 66b2e73

Please sign in to comment.