Skip to content

Commit

Permalink
Fix validators JSON tag in the core API
Browse files Browse the repository at this point in the history
  • Loading branch information
muXxer committed Feb 20, 2024
1 parent f99a10e commit 5eae165
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ type (

// ValidatorsResponse defines the response for the staking REST API call.
ValidatorsResponse struct {
Validators []*ValidatorResponse `serix:"stakers,lenPrefix=uint16"`
Validators []*ValidatorResponse `serix:",lenPrefix=uint16"`
PageSize uint32 `serix:""`
Cursor string `serix:",lenPrefix=uint8,omitempty"`
}
Expand Down
2 changes: 1 addition & 1 deletion api/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ func Test_CoreAPIJSONSerialization(t *testing.T) {
PageSize: 50,
},
Target: `{
"stakers": [
"validators": [
{
"address": "rms1prlsqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqcyz9fx",
"stakingEndEpoch": 0,
Expand Down

0 comments on commit 5eae165

Please sign in to comment.