Skip to content

Commit

Permalink
Fix sorting of accounts when doing updateauth, which would lead
Browse files Browse the repository at this point in the history
to cryptic error messages, and hard to debug transactions.
  • Loading branch information
abourget committed Jun 25, 2019
1 parent f1c6722 commit c76c82e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion eosc/cmd/systemUpdateauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ func sortAuth(auth eos.Authority) {
sort.Slice(auth.Accounts, func(i, j int) bool {
perm1 := auth.Accounts[i].Permission
perm2 := auth.Accounts[j].Permission
return perm1.Actor < perm2.Actor || perm1.Permission < perm2.Permission
if perm1.Actor == perm2.Actor {
return perm1.Permission < perm2.Permission
}
return perm1.Actor < perm2.Actor
})
sort.Slice(auth.Waits, func(i, j int) bool {
return auth.Waits[i].WaitSec < auth.Waits[j].WaitSec
Expand Down

0 comments on commit c76c82e

Please sign in to comment.