Documentation ¶
Index ¶
- type Config
- func (c *Config) AccountManager() *account.AccountManager
- func (c *Config) ChainHelper() *chain.ChainHelper
- func (c *Config) DataBase() *leveldb.Db
- func (c *Config) Magic() []byte
- func (c *Config) PeerManager() *peer.PeerManager
- func (c *Config) SnapShotFactory() *snapshot.SnapShotFactory
- func (c *Config) SnapShotManager() *snapshot.SnapShotManager
- func (c *Config) Version() Version
- type Configer
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config combines the database, version and magic value of the network. It can also store the Accounts, Chains and Snapshots Managers.
func (*Config) AccountManager ¶
func (c *Config) AccountManager() *account.AccountManager
AccountManager is getter for AccountManager, creates default if manager nil.
func (*Config) ChainHelper ¶
func (c *Config) ChainHelper() *chain.ChainHelper
ChainHelper is getter for ChainHelper, creates default if helper nil.
func (*Config) PeerManager ¶
func (c *Config) PeerManager() *peer.PeerManager
PeerManager is getter for PeerManager, creates default if manager nil.
func (*Config) SnapShotFactory ¶
func (c *Config) SnapShotFactory() *snapshot.SnapShotFactory
SnapShotFactory is getter for SnapShotFactory, creates default if factory nil.
func (*Config) SnapShotManager ¶
func (c *Config) SnapShotManager() *snapshot.SnapShotManager
SnapShotManager is getter for SnapShotManager, creates default if manager nil.
type Configer ¶
type Configer interface { // SnapShotManager is getter for SnapShotManager. SnapShotManager() *snapshot.SnapShotManager // AccountManager is getter for AccountManager. AccountManager() *account.AccountManager // ChainHelper is getter for ChainHelper. ChainHelper() *chain.ChainHelper // SnapShotFactory is getter for SnapShotFactory. SnapShotFactory() *snapshot.SnapShotFactory // Magic is getter for magic value of the network. Magic() []byte // Version is getter for Version instance. Version() Version }
Configer is a network configuration view.
type Version ¶
type Version [3]byte
Version this is the type for storing the protocol version. Range versions: 0.0.0 - 255.255.255. First byte for major changes. Second byte for minor changes. Third byte is optional value for micro changes.
func NewVersionByString ¶
NewVersionByString converts version string to Version type.