github.com/amazechain/amc@v0.1.3/cmd/amc/config.go (about)

     1  // Copyright 2022 The AmazeChain Authors
     2  // This file is part of the AmazeChain library.
     3  //
     4  // The AmazeChain library is free software: you can redistribute it and/or modify
     5  // it under the terms of the GNU Lesser General Public License as published by
     6  // the Free Software Foundation, either version 3 of the License, or
     7  // (at your option) any later version.
     8  //
     9  // The AmazeChain library is distributed in the hope that it will be useful,
    10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    12  // GNU Lesser General Public License for more details.
    13  //
    14  // You should have received a copy of the GNU Lesser General Public License
    15  // along with the AmazeChain library. If not, see <http://www.gnu.org/licenses/>.
    16  
    17  package main
    18  
    19  import (
    20  	"github.com/amazechain/amc/params"
    21  	"math/big"
    22  	"time"
    23  
    24  	"github.com/amazechain/amc/conf"
    25  )
    26  
    27  var DefaultConfig = conf.Config{
    28  	NodeCfg: conf.NodeConfig{
    29  		NodePrivate: "",
    30  		HTTP:        true,
    31  		HTTPHost:    "127.0.0.1",
    32  		HTTPPort:    "8545",
    33  		IPCPath:     "amc.ipc",
    34  		Miner:       false,
    35  	},
    36  	NetworkCfg: conf.NetWorkConfig{
    37  		Bootstrapped: true,
    38  	},
    39  	LoggerCfg: conf.LoggerConfig{
    40  		LogFile:    "./logger.log",
    41  		Level:      "debug",
    42  		MaxSize:    10,
    43  		MaxBackups: 10,
    44  		MaxAge:     30,
    45  		Compress:   true,
    46  	},
    47  	PprofCfg: conf.PprofConfig{
    48  		MaxCpu:     0,
    49  		Port:       6060,
    50  		TraceMutex: true,
    51  		TraceBlock: true,
    52  		Pprof:      false,
    53  	},
    54  	DatabaseCfg: conf.DatabaseConfig{
    55  		DBType:     "lmdb",
    56  		DBPath:     "chaindata",
    57  		DBName:     "amc",
    58  		SubDB:      []string{"chain"},
    59  		Debug:      false,
    60  		IsMem:      false,
    61  		MaxDB:      100,
    62  		MaxReaders: 1000,
    63  	},
    64  	MetricsCfg: conf.MetricsConfig{
    65  		Port: 6060,
    66  		HTTP: "127.0.0.1",
    67  	},
    68  
    69  	P2PCfg: &conf.P2PConfig{P2PLimit: &conf.P2PLimit{}},
    70  
    71  	//GenesisCfg: ReadGenesis("allocs/mainnet.json"),
    72  	GPO: conf.FullNodeGPO,
    73  	Miner: conf.MinerConfig{
    74  		GasCeil:  30000000,
    75  		GasPrice: big.NewInt(params.GWei),
    76  		Recommit: 4 * time.Second,
    77  	},
    78  }