mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
remove page param
This commit is contained in:
parent
2675dc59e9
commit
1651575805
2 changed files with 2 additions and 7 deletions
|
|
@ -1075,10 +1075,6 @@ func (c *Bor) CommitStates(
|
|||
chain chainContext,
|
||||
) error {
|
||||
number := header.Number.Uint64()
|
||||
// lastSync, err := c.GenesisContractsClient.LastStateSyncTime(number - 1)
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
_lastStateID, err := c.GenesisContractsClient.LastStateId(number - 1)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -45,10 +45,9 @@ func NewHeimdallClient(urlString string) (*HeimdallClient, error) {
|
|||
}
|
||||
|
||||
func (h *HeimdallClient) FetchStateSyncEvents(fromID uint64, to int64) ([]*EventRecordWithTime, error) {
|
||||
page := 1
|
||||
eventRecords := make([]*EventRecordWithTime, 0)
|
||||
for {
|
||||
queryParams := fmt.Sprintf("from-id=%d&to-time=%d&page=%d&limit=%d", fromID, to, page, stateFetchLimit)
|
||||
queryParams := fmt.Sprintf("from-id=%d&to-time=%d&limit=%d", fromID, to, stateFetchLimit)
|
||||
log.Info("Fetching state sync events", "queryParams", queryParams)
|
||||
response, err := h.FetchWithRetry("clerk/event-record/list", queryParams)
|
||||
if err != nil {
|
||||
|
|
@ -65,7 +64,7 @@ func (h *HeimdallClient) FetchStateSyncEvents(fromID uint64, to int64) ([]*Event
|
|||
if len(_eventRecords) < stateFetchLimit {
|
||||
break
|
||||
}
|
||||
page++
|
||||
fromID += uint64(stateFetchLimit)
|
||||
}
|
||||
|
||||
sort.SliceStable(eventRecords, func(i, j int) bool {
|
||||
|
|
|
|||
Loading…
Reference in a new issue