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 = 5050 // Default p2p port for listening DefaultHTTPPort = 18545 // Default TCP port for the HTTP RPC server DefaultWSPort = 18546 // 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 crx_call/estimateGas (0=infinite)", Value: gossip.DefaultConfig(cachescale.Identity).RPCGasCap, } RPCGlobalTxFeeCapFlag = cli.Float64Flag{ Name: "rpc.txfeecap", Usage: "Sets a cap on transaction fee (in CRX) 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("0x3a303f5ec1ec1ff1d4ce863129168c9eed0294459d6843652434f144adc39c5d"), opera.TestNetworkID: hash.HexToHash("0x69d80aaa400e55c2e5849f08f51c5517a068dafd76e713a49ebf0624f670de24"), } )
View Source
var AppHelpFlagGroups = calcAppHelpFlagGroups()
AppHelpFlagGroups is the application flags, grouped by functionality.
View Source
var (
Bootnodes = []string{
"enode://beb3f95429229b31f769e743ee4e341add132f4da59e1bb4e57ba2e8eaf9ecbe8d0f80a24a4d0e3ba67cf5ddfa704679d228681d32cc31a227cf8a451365c508@134.209.98.129:30399",
"enode://93efbfd654a890000cbba98a97aa60818807a9d2c104c852a3a3bff751878765d476131e496ef4753987ac48f7078cfe1eaf89864ba11661df6020e1487f9181@34.126.88.133:30399",
"enode://0121dcf0a7ac82b607fd54b274976e3503209b6f6cbb2f370bc281c3f79e7106b0d4273bfbe0465e113855814e50179b93d7a4a236055c5e671d3bd987c11709@34.107.57.65:30399",
"enode://d6efe29b88223cd5599fa0d1f65e44faaf1259e3465c00f0e153bba792874b8a1d7d356baef1bdf1cd2f94e8a8c08bb8ed5994a9c4c116e605508edc23271ac9@34.87.197.240:30399",
"enode://e6eb6f81050b212bcc80b408555969e36825bb15ad12be6e86c9930c8f9709c7f91651c04ea449c342c3f1d87e0104c6ed26b93726cc7ad533ffee308bb045da@34.150.87.60:30399",
}
)
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.