Skip to content

Commit

Permalink
chore(nodebuilder): elevate perms for certain endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
renaynay committed Sep 25, 2023
1 parent 8602d6e commit 3ccc8bc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nodebuilder/fraud/fraud.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type Module interface {
// TODO(@distractedm1nd): These structs need to be autogenerated.
type API struct {
Internal struct {
Subscribe func(context.Context, fraud.ProofType) (<-chan Proof, error) `perm:"public"`
Subscribe func(context.Context, fraud.ProofType) (<-chan Proof, error) `perm:"read"`
Get func(context.Context, fraud.ProofType) ([]Proof, error) `perm:"public"`
}
}
Expand Down
2 changes: 1 addition & 1 deletion nodebuilder/header/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ type API struct {
SyncState func(ctx context.Context) (sync.State, error) `perm:"read"`
SyncWait func(ctx context.Context) error `perm:"read"`
NetworkHead func(ctx context.Context) (*header.ExtendedHeader, error) `perm:"public"`
Subscribe func(ctx context.Context) (<-chan *header.ExtendedHeader, error) `perm:"public"`
Subscribe func(ctx context.Context) (<-chan *header.ExtendedHeader, error) `perm:"read"`
}
}

Expand Down
4 changes: 2 additions & 2 deletions nodebuilder/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ type API struct {
QueryDelegation func(
ctx context.Context,
valAddr state.ValAddress,
) (*types.QueryDelegationResponse, error) `perm:"public"`
) (*types.QueryDelegationResponse, error) `perm:"read"`
QueryUnbonding func(
ctx context.Context,
valAddr state.ValAddress,
) (*types.QueryUnbondingDelegationResponse, error) `perm:"public"`
) (*types.QueryUnbondingDelegationResponse, error) `perm:"read"`
QueryRedelegations func(
ctx context.Context,
srcValAddr,
Expand Down

0 comments on commit 3ccc8bc

Please sign in to comment.