Documentation ¶
Index ¶
- Constants
- Variables
- func AppendVMConfig(configFilePath string, conf *UNetworkConfig)
- func GetAttachCmd() *cobra.Command
- func GetCreatenodeCmd() *cobra.Command
- func GetInitCmd() *cobra.Command
- func GetStartCmd() *cobra.Command
- func InitConfigFiles(path string) error
- func SetUpRoot(cmd *cobra.Command)
- func Setup(ctx *cli.Context) error
- func TendermintLogger() tmlog.Logger
- type BaseConfig
- type Services
- type TenderminConfig
- type UNetworkConfig
Constants ¶
View Source
const ( FlagChainID = "chain-id" FlagENV = "env" )
View Source
const ( Staging = 20 TestNet = 19 MainNet = 18 PrivateChain = 1234 )
View Source
const EyesCacheSize = 10000
nolint TODO: move to config file
View Source
const (
FlagLogLevel = "log_level"
)
nolint
Variables ¶
View Source
var ( GenesisTargetGasLimit = big.NewInt(100000000) // TendermintAddrFlag is the address that will use to connect to the tendermint core node TendermintAddrFlag = cli.StringFlag{ Name: "tendermint_addr", Value: "tcp://localhost:26657", Usage: "This is the address that tendermint will use to connect to the tendermint core node. Please provide a port.", } // ABCIAddrFlag is the address that tendermint will use to listen to incoming ABCI connections // #stable - 0.4.0 ABCIAddrFlag = cli.StringFlag{ Name: "abci_laddr", Value: "tcp://0.0.0.0:26658", Usage: "This is the address that the ABCI server will use to listen to incoming connection from tendermint core.", } // ABCIProtocolFlag defines whether GRPC or SOCKET should be used for the ABCI connections // #stable - 0.4.0 ABCIProtocolFlag = cli.StringFlag{ Name: "abci_protocol", Value: "socket", Usage: "socket | grpc", } // VerbosityFlag defines the verbosity of the logging // #unstable VerbosityFlag = cli.IntFlag{ Name: "verbosity", Value: 3, Usage: "Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=core, 5=debug, 6=detail", } // ConfigFileFlag defines the path to a TOML config for go-ethereum // #unstable ConfigFileFlag = cli.StringFlag{ Name: "config", Usage: "TOML configuration file", } // TargetGasLimitFlag defines gas limit of the Genesis block // #unstable TargetGasLimitFlag = cli.Uint64Flag{ Name: "targetgaslimit", Usage: "Target gas limit sets the artificial target gas floor for the blocks to mine", Value: GenesisTargetGasLimit.Uint64(), } // WithTendermintFlag asks to start Tendermint // `tendermint init` and `tendermint node` when `tendermint init` // and `tendermint` are invoked respectively. WithTendermintFlag = cli.BoolFlag{ Name: "with-tendermint", Usage: "If set, it will invoke `tendermint init` and `tendermint node` " + "when `tendermint init` and `tendermint` are invoked respectively", } )
View Source
var AttachCmd = GetAttachCmd()
View Source
var (
CliContext *cli.Context
)
View Source
var CreatenodeCmd = GetCreatenodeCmd()
View Source
var InitCmd = GetInitCmd()
Functions ¶
func AppendVMConfig ¶
func AppendVMConfig(configFilePath string, conf *UNetworkConfig)
func GetAttachCmd ¶
func GetCreatenodeCmd ¶
func GetInitCmd ¶
func GetStartCmd ¶
GetStartCmd - initialize a command as the start command with tick
func InitConfigFiles ¶
func TendermintLogger ¶
TendermintLogger returns a new instance of an tendermint logger. With() should be called upon the returned instance to set default keys #unstable
Types ¶
type BaseConfig ¶
type BaseConfig struct { // The root directory for all data. // This should be set in viper so it can unmarshal into this struct RootDir string `mapstructure:"home"` }
func DefaultBaseConfig ¶
func DefaultBaseConfig() BaseConfig
type Services ¶
type Services struct {
// contains filtered or unexported fields
}
func StartServices ¶
func (*Services) BroadcastTransaction ¶
broadcast tx by tendermint
type TenderminConfig ¶
type TenderminConfig struct { ChainId uint `mapstructure:"chainid"` RootDir string `mapstructure:"home"` ABCIAddr string `mapstructure:"abci_laddr"` ABCIProtocol string `mapstructure:"abci_protocol"` RPCEnabledFlag bool `mapstructure:"rpc"` RPCListenAddrFlag string `mapstructure:"rpcaddr"` RPCPortFlag uint `mapstructure:"rpcport"` RPCCORSDomainFlag string `mapstructure:"rpccorsdomain"` RPCApiFlag string `mapstructure:"rpcapi"` RPCVirtualHostsFlag string `mapstructure:"rpcvhosts"` WSEnabledFlag bool `mapstructure:"ws"` WSListenAddrFlag string `mapstructure:"wsaddr"` WSPortFlag uint `mapstructure:"wsport"` WSApiFlag string `mapstructure:"wsapi"` VerbosityFlag uint `mapstructure:"verbosity"` GCMode string `mapstructure:"gcmode"` }
func DefaultTendermintConfig ¶
func DefaultTendermintConfig() TenderminConfig
type UNetworkConfig ¶
type UNetworkConfig struct { BaseConfig BaseConfig `mapstructure:",squash"` TMConfig tmcfg.Config `mapstructure:",squash"` EMConfig TenderminConfig `mapstructure:"vm"` }
func DefaultConfig ¶
func DefaultConfig() *UNetworkConfig
func ParseConfig ¶
func ParseConfig() (*UNetworkConfig, error)
copied from tendermint/commands/root.go to call our revised EnsureRoot
Click to show internal directories.
Click to hide internal directories.