Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultRPCEndPoint = "0.0.0.0:8888" DefaultHTTPEndPoint = "0.0.0.0:8080" )
View Source
const ( DEFAULT_NODE_PORT = uint(20338) DEFAULT_CONSENSUS_PORT = uint(20339) DEFAULT_MAX_CONN_IN_BOUND = uint(23) DEFAULT_MAX_CONN_OUT_BOUND = uint(23) DEFAULT_MAX_CONN_IN_BOUND_FOR_SINGLE_IP = uint(23) )
View Source
const (
DefaultMinDiskSpaceInGB = 200
)
Variables ¶
View Source
var DefaultNodeConfig = node.Config{ ChainId: common.ChainNameMainNet, DataDir: DefaultDataDir(), LogLevel: mylog.DebugLevel, MinDiskSpaceInGB: DefaultMinDiskSpaceInGB, P2P: service_configs.P2PConfig{ Genesis: MainNetConfig, EnableConsensus: true, ReservedCfg: &service_configs.P2PRsvConfig{}, ReservedPeersOnly: false, NodePort: DEFAULT_NODE_PORT, NodeConsensusPort: DEFAULT_CONSENSUS_PORT, DualPortSupport: true, IsTLS: false, CertPath: "", KeyPath: "", CAPath: "", MaxConnInBound: DEFAULT_MAX_CONN_IN_BOUND, MaxConnOutBound: DEFAULT_MAX_CONN_OUT_BOUND, MaxConnInBoundForSingleIP: DEFAULT_MAX_CONN_IN_BOUND_FOR_SINGLE_IP, }, GRPC: service_configs.GRPCConfig{ RPCName: "rpc", RPCListen: DefaultRPCEndPoint, HTTPListen: DefaultHTTPEndPoint, HTTPCors: []string{"*"}, HTTPLimit: 100, }, Consensus: service_configs.ConsensusConfig{ Type: "SABFT", BootStrap: true, LocalBpName: constants.COSInitMiner, LocalBpPrivateKey: constants.InitminerPrivKey, }, HealthCheck: service_configs.HCheck{ Port: "9090", }, Database: &service_configs.DatabaseConfig{ Driver: "mysql", User: "contentos", Password: "123456", Db: "contentosdb", }, }
DefaultConfig contains reasonable default settings.
View Source
var DevNetConfig = &service_configs.GenesisConfig{ SeedList: []string{ fmt.Sprintf("127.0.0.1:%d", DEFAULT_NODE_PORT)}, }
View Source
var MainNetConfig = &service_configs.GenesisConfig{ SeedList: []string{ fmt.Sprintf("127.0.0.1:%d", DEFAULT_NODE_PORT)}, }
View Source
var TestNetConfig = &service_configs.GenesisConfig{ SeedList: []string{ fmt.Sprintf("127.0.0.1:%d", DEFAULT_NODE_PORT)}, }
Functions ¶
func DefaultDataDir ¶
func DefaultDataDir() string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.