Skip to content

Commit 66b2e73

Browse files
committed
nil pointer fix
1 parent ce29dd2 commit 66b2e73

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ctxc/sync.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ func (pm *ProtocolManager) synchronise(peer *peer) {
172172
td := pm.blockchain.GetTd(currentBlock.Hash(), currentBlock.NumberU64())
173173

174174
pHead, pTd := peer.Head()
175+
if pTd == nil {
176+
return
177+
}
178+
175179
if pTd.Cmp(td) <= 0 {
176180
return
177181
}

0 commit comments

Comments
 (0)