Skip to content

Commit 5bf6612

Browse files
authored
cmd/devp2p: fix error in updating the cursor when collecting records for route53 (ethereum#22538)
This PR fixes a regression introduced in ethereum#22360, when we updated to the v2 of the AWS sdk, which causes current crawler to just get the same first 100 results over and over, and get stuck in a loop.
1 parent 9429ab1 commit 5bf6612

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

cmd/devp2p/dns_route53.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,16 @@ func (c *route53Client) collectRecords(name string) (map[string]recordSet, error
315315
break
316316
}
317317

318-
// sets the cursor to the next batch
318+
// Set the cursor to the next batc. From the AWS docs:
319+
//
320+
// To display the next page of results, get the values of NextRecordName,
321+
// NextRecordType, and NextRecordIdentifier (if any) from the response. Then submit
322+
// another ListResourceRecordSets request, and specify those values for
323+
// StartRecordName, StartRecordType, and StartRecordIdentifier.
324+
319325
req.StartRecordIdentifier = resp.NextRecordIdentifier
326+
req.StartRecordName = resp.NextRecordName
327+
req.StartRecordType = resp.NextRecordType
320328
}
321329

322330
return existing, nil

0 commit comments

Comments
 (0)