Skip to content

Commit 0dba01d

Browse files
authored
handle the case that peer send no best heads (#270)
1 parent 61ab487 commit 0dba01d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Node/Sources/Node/NetworkingProtocol/SyncManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public actor SyncManager {
7878
}
7979

8080
let currentHead = await blockchain.dataProvider.bestHead
81-
if currentHead.timeslot >= networkBest!.timeslot {
81+
if let networkBest, currentHead.timeslot >= networkBest.timeslot {
8282
syncCompleted()
8383
return
8484
}

0 commit comments

Comments
 (0)