From 5eae165ac8c398110700e528d3a78d62a57bdb5d Mon Sep 17 00:00:00 2001 From: muXxer Date: Tue, 20 Feb 2024 16:55:00 +0100 Subject: [PATCH] Fix validators JSON tag in the core API --- api/core.go | 2 +- api/core_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core.go b/api/core.go index 4291d8fd8..283239e5e 100644 --- a/api/core.go +++ b/api/core.go @@ -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"` } diff --git a/api/core_test.go b/api/core_test.go index 6e15d4bfe..5a807936e 100644 --- a/api/core_test.go +++ b/api/core_test.go @@ -726,7 +726,7 @@ func Test_CoreAPIJSONSerialization(t *testing.T) { PageSize: 50, }, Target: `{ - "stakers": [ + "validators": [ { "address": "rms1prlsqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqcyz9fx", "stakingEndEpoch": 0,