Skip to content

Commit

Permalink
cmd/devp2p: fix error in updating the cursor when collecting records …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
holiman authored and atif-konasl committed Oct 15, 2021
1 parent dd322e9 commit 2af710a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/devp2p/dns_route53.go
Expand Up @@ -315,8 +315,16 @@ func (c *route53Client) collectRecords(name string) (map[string]recordSet, error
break
}

// sets the cursor to the next batch
// Set the cursor to the next batc. From the AWS docs:
//
// To display the next page of results, get the values of NextRecordName,
// NextRecordType, and NextRecordIdentifier (if any) from the response. Then submit
// another ListResourceRecordSets request, and specify those values for
// StartRecordName, StartRecordType, and StartRecordIdentifier.

req.StartRecordIdentifier = resp.NextRecordIdentifier
req.StartRecordName = resp.NextRecordName
req.StartRecordType = resp.NextRecordType
}

return existing, nil
Expand Down

0 comments on commit 2af710a

Please sign in to comment.