Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultCacheSize is calculated as memory consumption in a worst case scenario with default configuration // Average memory consumption might be 3-5 times lower than the maximum DefaultCacheSize = 3200 ConstantCacheSize = 1024 )
View Source
const ( DefaultP2PPort = 5040 // Default p2p port for listening DefaultHTTPPort = 18550 // Default TCP port for the HTTP RPC server DefaultWSPort = 18540 // Default TCP port for the websocket RPC server )
Variables ¶
View Source
var ( // DataDirFlag defines directory to store Lachesis state and user's wallets DataDirFlag = utils.DirectoryFlag{ Name: "datadir", Usage: "Data directory for the databases and keystore", Value: utils.DirectoryString(DefaultDataDir()), } CacheFlag = cli.IntFlag{ Name: "cache", Usage: "Megabytes of memory allocated to internal caching", Value: DefaultCacheSize, } // GenesisFlag specifies network genesis configuration GenesisFlag = cli.StringFlag{ Name: "genesis", Usage: "'path to genesis file' - sets the network genesis configuration.", } RPCGlobalGasCapFlag = cli.Uint64Flag{ Name: "rpc.gascap", Usage: "Sets a cap on gas that can be used in ftm_call/estimateGas (0=infinite)", Value: gossip.DefaultConfig(cachescale.Identity).RPCGasCap, } RPCGlobalTxFeeCapFlag = cli.Float64Flag{ Name: "rpc.txfeecap", Usage: "Sets a cap on transaction fee (in FTM) that can be sent via the RPC APIs (0 = no cap)", Value: gossip.DefaultConfig(cachescale.Identity).RPCTxFeeCap, } AllowedOperaGenesisHashes = map[uint64]hash.Hash{ opera.MainNetworkID: hash.HexToHash("0x8b1412de705ff787d86dda965bc645ae12259c101d42af4965f2e98aeeb3811b"), opera.TestNetworkID: hash.HexToHash("0xc4a5fc96e575a16a9a0c7349d44dc4d0f602a54e0a8543360c2fee4c3937b49e"), } )
View Source
var AppHelpFlagGroups = calcAppHelpFlagGroups()
AppHelpFlagGroups is the application flags, grouped by functionality.
View Source
var (
Bootnodes = []string{
"enode://4f54fe80bc896c3e655f75bf424c179b2c3ad70616f69cda92ea77542c7e1d319e8b3704a64b01efb4fa72fdd4bf6aa1bf60af9943130ecddb54ce96d6165588@62.109.7.134:5040",
"enode://aecc6680d3aad1a5373833302aef44d903bcd2cd2729d2bbab6c6293b8f45260ed5732125b4e8adffbb5fb2e7226503991090b007700aa6116ff805585cbbf4c@82.146.62.206:5040",
}
)
View Source
var (
EventsCheckFlag = cli.BoolTFlag{
Name: "check",
Usage: "true if events should be fully checked before importing",
}
)
View Source
var FakeNetFlag = cli.StringFlag{
Name: "fakenet",
Usage: "'n/N' - sets coinbase as fake n-th key from genesis of N validators.",
}
FakeNetFlag enables special testnet, where validators are automatically created
View Source
var NodeDefaultConfig = node.Config{ DataDir: DefaultDataDir(), HTTPPort: DefaultHTTPPort, HTTPModules: []string{}, HTTPVirtualHosts: []string{"localhost"}, HTTPTimeouts: rpc.DefaultHTTPTimeouts, WSPort: DefaultWSPort, WSModules: []string{}, GraphQLVirtualHosts: []string{"localhost"}, P2P: p2p.Config{ NoDiscovery: false, DiscoveryV5: true, ListenAddr: fmt.Sprintf(":%d", DefaultP2PPort), MaxPeers: 50, NAT: nat.Any(), }, }
NodeDefaultConfig contains reasonable default settings.
Functions ¶
func DefaultDataDir ¶
func DefaultDataDir() string
DefaultDataDir is the default data directory to use for the databases and other persistence requirements.
func FindAccountKeypath ¶
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.