Documentation ¶
Index ¶
- Constants
- Variables
- func GetValidatorsFromPrefixPath(prefix string, validatorType validators.ValidatorType) (validators.Validators, error)
- func ValidateMinMaxValidatorsNumber(minValidatorCount uint64, maxValidatorCount uint64) error
- type CLIOutput
- type CommandResult
- type JSONOutput
- type OutputFormatter
Constants ¶
View Source
const ( ConsensusFlag = "consensus" NoDiscoverFlag = "no-discover" BootnodeFlag = "bootnode" LogLevelFlag = "log-level" IBFTValidatorTypeFlag = "ibft-validator-type" IBFTValidatorFlag = "ibft-validator" IBFTValidatorPrefixFlag = "ibft-validators-prefix-path" )
View Source
const ( DefaultGenesisFileName = "genesis.json" DefaultChainName = "alveychain" DefaultChainID = 100 DefaultPremineBalance = "0xD3C21BCECCEDA1000000" // 1 million units of native network currency DefaultConsensus = server.IBFTConsensus DefaultGenesisGasUsed = 458752 // 0x70000 DefaultGenesisGasLimit = 5242880 // 0x500000 )
View Source
const ( JSONOutputFlag = "json" GRPCAddressFlag = "grpc-address" JSONRPCFlag = "jsonrpc" )
View Source
const (
GRPCAddressFlagLEGACY = "grpc"
)
GRPCAddressFlagLEGACY Legacy flag that needs to be present to preserve backwards compatibility with running clients
Variables ¶
Functions ¶
func GetValidatorsFromPrefixPath ¶
func GetValidatorsFromPrefixPath( prefix string, validatorType validators.ValidatorType, ) (validators.Validators, error)
GetValidatorsFromPrefixPath extracts the addresses of the validators based on the directory prefix. It scans the directories for validator private keys and compiles a list of addresses
Types ¶
type CLIOutput ¶
type CLIOutput struct {
// contains filtered or unexported fields
}
func (*CLIOutput) SetCommandResult ¶
func (c *CLIOutput) SetCommandResult(result CommandResult)
func (*CLIOutput) WriteOutput ¶
func (cli *CLIOutput) WriteOutput()
type CommandResult ¶
type CommandResult interface {
GetOutput() string
}
type JSONOutput ¶
type JSONOutput struct {
// contains filtered or unexported fields
}
func (*JSONOutput) SetCommandResult ¶
func (c *JSONOutput) SetCommandResult(result CommandResult)
func (*JSONOutput) WriteOutput ¶
func (jo *JSONOutput) WriteOutput()
type OutputFormatter ¶
type OutputFormatter interface { // SetError sets the encountered error SetError(err error) // SetCommandResult sets the result of the command execution SetCommandResult(result CommandResult) // WriteOutput writes the result / error output WriteOutput() // contains filtered or unexported methods }
OutputFormatter is the standardized interface all output formatters should use
func InitializeOutputter ¶
func InitializeOutputter(cmd *cobra.Command) OutputFormatter
Source Files ¶
Click to show internal directories.
Click to hide internal directories.