Skip to content
Snippets Groups Projects
Commit fa1aafc4 authored by Miguel Montes's avatar Miguel Montes
Browse files

Ordenación de la salida del comando proposals

parent 6ead63b8
No related branches found
No related tags found
No related merge requests found
...@@ -230,6 +230,7 @@ func (node *Node) Votes(blockNumber int64) (votes Proposals) { ...@@ -230,6 +230,7 @@ func (node *Node) Votes(blockNumber int64) (votes Proposals) {
for proposal := range snapshot.Tally { for proposal := range snapshot.Tally {
votes.Proposals = append(votes.Proposals, BytesToHex(proposal[:])) votes.Proposals = append(votes.Proposals, BytesToHex(proposal[:]))
} }
sort.Strings(votes.Proposals)
votes.Votes = make(map[string]map[string]*bool) votes.Votes = make(map[string]map[string]*bool)
votes.Tally = make(map[string]*Tally) votes.Tally = make(map[string]*Tally)
for _, v := range snapshot.Votes { for _, v := range snapshot.Votes {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment