Skip to content

Commit 7a4dd63

Browse files
authored
fix(p2p): add correct header length validation (#272)
Fixes #225
1 parent 64c7533 commit 7a4dd63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

p2p/session.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ LOOP:
122122
return nil, ctx.Err()
123123
case res := <-result:
124124
headers = append(headers, res...)
125-
if uint64(len(headers)) == amount {
125+
if uint64(len(headers)) >= amount {
126126
break LOOP
127127
}
128128
}

0 commit comments

Comments
 (0)