(moniker, validatorPublicKey, keyPassword, bondAmount string)
| 194 | } |
| 195 | |
| 196 | func (c CLI) CreateValidator(moniker, validatorPublicKey, keyPassword, bondAmount string) (*string, error) { |
| 197 | var input [][]byte |
| 198 | if c.keyringBackend == keyring.BackendFile { |
| 199 | input = c.formatInputs([]string{keyPassword, keyPassword}) |
| 200 | } |
| 201 | |
| 202 | return c.shellExecInput("sifnoded", input, |
| 203 | "tx", "staking", "create-validator", |
| 204 | "--commission-max-change-rate", "0.1", |
| 205 | "--commission-max-rate", "0.1", |
| 206 | "--commission-rate", "0.1", |
| 207 | "--amount", bondAmount, |
| 208 | "--pubkey", validatorPublicKey, |
| 209 | "--moniker", moniker, |
| 210 | "--chain-id", c.chainID, |
| 211 | "--min-self-delegation", "1", |
| 212 | "--gas", "auto", |
| 213 | "--from", moniker, |
| 214 | "--keyring-backend", c.keyringBackend, |
| 215 | "-y") |
| 216 | } |
| 217 | |
| 218 | func (c CLI) formatInputs(inputs []string) [][]byte { |
| 219 | formatted := make([][]byte, 0) |
nothing calls this directly
no test coverage detected