Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for getvalidators #24

Open
mwherman2000 opened this issue Jun 20, 2018 · 0 comments
Open

Add support for getvalidators #24

mwherman2000 opened this issue Jun 20, 2018 · 0 comments

Comments

@mwherman2000
Copy link

https://github.com/neo-project/neo/blob/b9bb68b94e9231f9533ebbed2ca98ffbda0b938a/neo/Network/RPC/RpcServer.cs#L200:

                case "getvalidators":
                    {
                        var validators = Blockchain.Default.GetValidators();
                        return Blockchain.Default.GetEnrollments().Select(p =>
                        {
                            JObject validator = new JObject();
                            validator["publickey"] = p.PublicKey.ToString();
                            validator["votes"] = p.Votes.ToString();
                            validator["active"] = validators.Contains(p.PublicKey);
                            return validator;
                        }).ToArray();
                    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant