Documentation
¶
Overview ¶
Package config provides config structure for engine.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadGenesisBlock ¶
func ReadGenesisBlock(config *Config) (*blockchain.Block, error)
Types ¶
type Config ¶
type Config struct { System *SystemConfig `json:"system"` RPC *RPCConfig `json:"rpc"` TransactionPool *TransactionPoolConfig `json:"transactionPool"` Network *NetworkConfig `json:"network"` Genesis *GenesisConfig `json:"genesis"` Generator *GeneratorConfig `json:"generator"` }
func (*Config) InsertDefault ¶
type GeneratorConfig ¶
type GeneratorConfig struct {
Keys *KeysConfig `json:"keys"`
}
type GenesisBlockConfig ¶
type GenesisConfig ¶
type GenesisConfig struct { Block *GenesisBlockConfig `json:"block"` ChainID codec.Hex `json:"chainID"` BlockTime uint32 `json:"blockTime"` MaxTransactionsSize uint32 `json:"maxTransactionsSize"` BFTBatchSize uint32 `json:"bftBatchSize"` }
func (*GenesisConfig) InsertDefault ¶
func (c *GenesisConfig) InsertDefault() error
type KeysConfig ¶
type KeysConfig struct {
FromFile string `json:"fromFile"`
}
type NetworkConfig ¶
type NetworkConfig struct { Addresses []string `json:"addresses"` AllowIncomingConnections bool `json:"allowIncomingConnections"` EnableNATService bool `json:"enableNATService,omitempty"` EnableUsingRelayService bool `json:"enableUsingRelayService"` EnableRelayService bool `json:"enableRelayService,omitempty"` EnableHolePunching bool `json:"enableHolePunching,omitempty"` SeedPeers []string `json:"seedPeers"` FixedPeers []string `json:"fixedPeers,omitempty"` BlacklistedIPs []string `json:"blackListedIPs,omitempty"` MinNumOfConnections int `json:"minNumOfConnections"` MaxNumOfConnections int `json:"maxNumOfConnections"` // GossipSub configuration IsSeedPeer bool `json:"isSeedPeer,omitempty"` }
Config type - a p2p configuration.
type RPCConfig ¶
type RPCConfig struct { Modes []string `json:"modes"` Port int `json:"port"` Host string `json:"host"` }
func (*RPCConfig) InsertDefault ¶
type SystemConfig ¶
type SystemConfig struct { Version string `json:"version"` DataPath string `json:"dataPath"` KeepEventsForHeights *int `json:"keepEventsForHeights"` LogLevel string `json:"logLevel"` MaxBlockCache *int `json:"maxBlockCache"` }
func (SystemConfig) GetKeepEventsForHeights ¶
func (c SystemConfig) GetKeepEventsForHeights() int
func (SystemConfig) GetMaxBlokckCache ¶
func (c SystemConfig) GetMaxBlokckCache() int
func (*SystemConfig) InsertDefault ¶
func (c *SystemConfig) InsertDefault() error
func (*SystemConfig) Merge ¶
func (c *SystemConfig) Merge(config *SystemConfig)
func (SystemConfig) Validate ¶
func (c SystemConfig) Validate() error
type TransactionPoolConfig ¶
type TransactionPoolConfig struct { MaxTransactions int `json:"maxTransactions"` MaxTransactionsPerAccount int `json:"maxTransactionsPerAccount"` TransactionExpiryTime int `json:"transactionExpiryTime"` MinEntranceFeePriority uint64 `json:"minEntranceFeePriority,string"` MinReplacementFeeDifference uint64 `json:"minReplacementFeeDifference,string"` }
func (*TransactionPoolConfig) InsertDefault ¶
func (c *TransactionPoolConfig) InsertDefault() error
Click to show internal directories.
Click to hide internal directories.