MCPcopy Create free account
hub / github.com/DNAProject/DNA / NewBlockchainConfig

Function NewBlockchainConfig

common/config/config.go:409–454  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

407}
408
409func NewBlockchainConfig() *BlockchainConfig {
410 return &BlockchainConfig{
411 Genesis: NewGenesisConfig(),
412 Common: &CommonConfig{
413 LogLevel: DEFAULT_LOG_LEVEL,
414 EnableEventLog: DEFAULT_ENABLE_EVENT_LOG,
415 SystemFee: make(map[string]int64),
416 GasLimit: DEFAULT_GAS_LIMIT,
417 DataDir: DEFAULT_DATA_DIR,
418 },
419 Consensus: &ConsensusConfig{
420 EnableConsensus: true,
421 MaxTxInBlock: DEFAULT_MAX_TX_IN_BLOCK,
422 },
423 P2PNode: &P2PNodeConfig{
424 ReservedCfg: &P2PRsvConfig{},
425 ReservedPeersOnly: false,
426 NetworkId: NETWORK_ID_MAIN_NET,
427 NetworkName: GetNetworkName(NETWORK_ID_MAIN_NET),
428 NetworkMagic: GetNetworkMagic(NETWORK_ID_MAIN_NET),
429 NodePort: DEFAULT_NODE_PORT,
430 IsTLS: false,
431 CertPath: "",
432 KeyPath: "",
433 CAPath: "",
434 HttpInfoPort: DEFAULT_HTTP_INFO_PORT,
435 MaxHdrSyncReqs: DEFAULT_MAX_SYNC_HEADER,
436 MaxConnInBound: DEFAULT_MAX_CONN_IN_BOUND,
437 MaxConnOutBound: DEFAULT_MAX_CONN_OUT_BOUND,
438 MaxConnInBoundForSingleIP: DEFAULT_MAX_CONN_IN_BOUND_FOR_SINGLE_IP,
439 },
440 Rpc: &RpcConfig{
441 EnableHttpJsonRpc: true,
442 HttpJsonPort: DEFAULT_RPC_PORT,
443 HttpLocalPort: DEFAULT_RPC_LOCAL_PORT,
444 },
445 Restful: &RestfulConfig{
446 EnableHttpRestful: true,
447 HttpRestPort: DEFAULT_REST_PORT,
448 },
449 Ws: &WebSocketConfig{
450 EnableHttpWs: true,
451 HttpWsPort: DEFAULT_WS_PORT,
452 },
453 }
454}
455
456func (this *BlockchainConfig) GetBookkeepers() ([]keypair.PublicKey, error) {
457 var bookKeepers []string

Callers 1

config.goFile · 0.85

Calls 3

NewGenesisConfigFunction · 0.85
GetNetworkNameFunction · 0.85
GetNetworkMagicFunction · 0.85

Tested by

no test coverage detected