Skip to content

Commit

Permalink
Fix the multisig propose --request-producers to respect not having
Browse files Browse the repository at this point in the history
`--with-subaccounts`.  Better display, better algorithm, better a lot
of things,.. incredible this commit!
  • Loading branch information
abourget committed Dec 14, 2018
1 parent 17ab1ab commit 8f748c9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions eosc/cmd/msigPropose.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,19 @@ func requestProducers(api *eos.API) (out map[string]bool, err error) {

out = make(map[string]bool)
for idx, p := range producers {
if idx > 29 {
if len(out) > 29 {
break
}
fmt.Printf("Recursing producer %d: %s\n", idx+1, p["owner"])
out, err = recurseAccounts(api, out, p["owner"].(string), "active", 0, 4)
if err != nil {
errorCheck("failed recursing", err)

newAcct := fmt.Sprintf("%s@active", p["owner"].(string))

if isActive, _ := p["is_active"].(float64); isActive != 1 {
fmt.Printf("Skipping inactive no. %d: %s\n", idx+1, newAcct)
continue
}

fmt.Printf("Adding no. %d: %s\n", idx+1, newAcct)
out[newAcct] = true
}

return
Expand Down

0 comments on commit 8f748c9

Please sign in to comment.