We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9453957 commit 98d1413Copy full SHA for 98d1413
dot/network/sync_justification.go
@@ -36,6 +36,15 @@ func (q *syncQueue) finalizeAtHead() {
36
return
37
}
38
39
+ head, err := q.s.blockState.BestBlockNumber()
40
+ if err != nil {
41
+ continue
42
+ }
43
+
44
+ if head.Int64() < q.goal {
45
46
47
48
curr, err := q.s.blockState.GetFinalizedHeader(0, 0)
49
if err != nil {
50
continue
@@ -50,12 +59,6 @@ func (q *syncQueue) finalizeAtHead() {
59
51
60
prev = curr
52
61
53
- // no new blocks have been finalized, request block justifications from peers
54
- head, err := q.s.blockState.BestBlockNumber()
55
- if err != nil {
56
- continue
57
- }
58
-
62
start := head.Uint64() - uint64(blockRequestSize)
63
if curr.Number.Uint64() > start {
64
start = curr.Number.Uint64() + 1
0 commit comments