diff --git a/bfa_client/src/client/bfa_client.go b/bfa_client/src/client/bfa_client.go index f3f25ace7e062c969343a22e01d80f52332cb68c..7be848fbce2bda9d1e0f13052f07c381cae87f74 100644 --- a/bfa_client/src/client/bfa_client.go +++ b/bfa_client/src/client/bfa_client.go @@ -331,19 +331,18 @@ func propose() { defer node.Close() util.Ensure(node.IsSealer(bfa.Self), "Solo los selladores pueden votar") votes := node.Votes(latest) - util.Ensure(flags.NArg() > 0, "No se especificaron candidatos por los cuales votar") + util.Ensure(flags.NArg() > 0, "No se especificaron candidatos por los cuales votar\n") for i := 0; i < flags.NArg(); i++ { address := flags.Arg(i) util.Ensure(util.IsAddress(address), "'%v' no es una dirección válida", address) - if _, ok := votes.Tally[address]; ok { - continue // address is in a proposal, so we allow voting either way - } - isSealer := util.Contains(votes.Signers, address) - switch { // address is not in a proposal, we allow removing signers or adding non signers - case isSealer && authorize: - util.Error("'%v' ya es un sellador", address) - case !isSealer && !authorize: - util.Error("'%v' no es un sellador", address) + if _, ok := votes.Tally[address]; !ok { + isSealer := util.Contains(votes.Signers, address) + switch { // address is not in a proposal, we only allow removing signers or adding non signers + case isSealer && authorize: + util.Error("'%v' ya es un sellador", address) + case !isSealer && !authorize: + util.Error("'%v' no es un sellador", address) + } } node.Propose(address, authorize) if json { @@ -448,11 +447,6 @@ func main() { validCommands = append(validCommands, cmd) } sort.Strings(validCommands) - //defer func() { - // if err := recover(); err != nil { - // log.Printf("Error: %s", err) - // } - //}() if len(os.Args) > 1 { command = commands[os.Args[1]] }