forked from TrueCloudLab/neoneo-go
rpc: answer with zero-length when there are no registered validators
There is a huge difference between "result" : [], and "result" : null,
This commit is contained in:
parent
f287681fa7
commit
6e252fbaae
1 changed files with 1 additions and 1 deletions
|
@ -856,7 +856,7 @@ func (s *Server) getValidators(_ request.Params) (interface{}, *response.Error)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, response.NewRPCError("can't get enrollments", "", err)
|
return nil, response.NewRPCError("can't get enrollments", "", err)
|
||||||
}
|
}
|
||||||
var res []result.Validator
|
var res = make([]result.Validator, 0)
|
||||||
for _, v := range enrollments {
|
for _, v := range enrollments {
|
||||||
res = append(res, result.Validator{
|
res = append(res, result.Validator{
|
||||||
PublicKey: *v.Key,
|
PublicKey: *v.Key,
|
||||||
|
|
Loading…
Reference in a new issue