Skip to content

Commit e98650b

Browse files
committed
Remove a couple TODOs
1 parent e39feb7 commit e98650b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

application.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ func (ac *ApplicationClient) GetApplication(
4444
}
4545

4646
// GetAllApplications returns all applications in the network.
47-
// TODO_FUTURE: support pagination if/when it becomes a performance issue.
4847
func (ac *ApplicationClient) GetAllApplications(
4948
ctx context.Context,
5049
) ([]types.Application, error) {
5150
req := &types.QueryAllApplicationsRequest{
51+
// TODO_FUTURE: support pagination if/when it becomes a performance issue.
5252
Pagination: &query.PageRequest{
5353
Limit: query.PaginationMaxLimit,
5454
},
@@ -62,10 +62,6 @@ func (ac *ApplicationClient) GetAllApplications(
6262
return res.Applications, nil
6363
}
6464

65-
// This is an inefficient implementation, as there can be a very large number
66-
// of onchain applications, only a few of which are likely to be delegating to a specific gateway.
67-
// But this can only be fixed once the above proposed enhancement on poktroll is completed.
68-
//
6965
// GetApplicationsDelegatingToGateway returns the application addresses that are
7066
// delegating to the given gateway address.
7167
func (ac *ApplicationClient) GetApplicationsDelegatingToGateway(
@@ -76,10 +72,11 @@ func (ac *ApplicationClient) GetApplicationsDelegatingToGateway(
7672
gatewayDelegatingApplications := make([]string, 0)
7773

7874
req := &types.QueryAllApplicationsRequest{
75+
GatewayAddressDelegatedTo: gatewayAddress,
76+
// TODO_FUTURE: support pagination if/when it becomes a performance issue.
7977
Pagination: &query.PageRequest{
8078
Limit: query.PaginationMaxLimit,
8179
},
82-
GatewayAddressDelegatedTo: gatewayAddress,
8380
}
8481

8582
res, err := ac.QueryClient.AllApplications(ctx, req)

0 commit comments

Comments
 (0)