Skip to content

Commit 8f748c9

Browse files
committedDec 14, 2018
Fix the multisig propose --request-producers to respect not having
`--with-subaccounts`. Better display, better algorithm, better a lot of things,.. incredible this commit!
1 parent 17ab1ab commit 8f748c9

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed
 

‎eosc/cmd/msigPropose.go

+10-5
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,19 @@ func requestProducers(api *eos.API) (out map[string]bool, err error) {
130130

131131
out = make(map[string]bool)
132132
for idx, p := range producers {
133-
if idx > 29 {
133+
if len(out) > 29 {
134134
break
135135
}
136-
fmt.Printf("Recursing producer %d: %s\n", idx+1, p["owner"])
137-
out, err = recurseAccounts(api, out, p["owner"].(string), "active", 0, 4)
138-
if err != nil {
139-
errorCheck("failed recursing", err)
136+
137+
newAcct := fmt.Sprintf("%s@active", p["owner"].(string))
138+
139+
if isActive, _ := p["is_active"].(float64); isActive != 1 {
140+
fmt.Printf("Skipping inactive no. %d: %s\n", idx+1, newAcct)
141+
continue
140142
}
143+
144+
fmt.Printf("Adding no. %d: %s\n", idx+1, newAcct)
145+
out[newAcct] = true
141146
}
142147

143148
return

0 commit comments

Comments
 (0)
Please sign in to comment.