Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Version the version of the node, set at build time. Version string )
Functions ¶
This section is empty.
Types ¶
type ApplicationConfiguration ¶
type ApplicationConfiguration struct {
LogPath string `yaml:"LogPath"`
DBConfiguration storage.DBConfiguration `yaml:"DBConfiguration"`
Address string `yaml:"Address"`
NodePort uint16 `yaml:"NodePort"`
Relay bool `yaml:"Relay"`
DialTimeout time.Duration `yaml:"DialTimeout"`
ProtoTickInterval time.Duration `yaml:"ProtoTickInterval"`
PingInterval time.Duration `yaml:"PingInterval"`
PingTimeout time.Duration `yaml:"PingTimeout"`
MaxPeers int `yaml:"MaxPeers"`
AttemptConnPeers int `yaml:"AttemptConnPeers"`
MinPeers int `yaml:"MinPeers"`
Prometheus metrics.Config `yaml:"Prometheus"`
Pprof metrics.Config `yaml:"Pprof"`
RPC RPCConfig `yaml:"RPC"`
UnlockWallet WalletConfig `yaml:"UnlockWallet"`
}
ApplicationConfiguration config specific to the node.
type Config ¶
type Config struct {
ProtocolConfiguration ProtocolConfiguration `yaml:"ProtocolConfiguration"`
ApplicationConfiguration ApplicationConfiguration `yaml:"ApplicationConfiguration"`
}
Config top level struct representing the config for the node.
func (Config) GenerateUserAgent ¶
GenerateUserAgent creates user agent string based on build time environment.
type NetMode ¶
type NetMode uint32
NetMode describes the mode the blockchain will operate on.
const ( // ModeMainNet contains magic code used in the NEO main official network. ModeMainNet NetMode = 0x00746e41 // 7630401 // ModeTestNet contains magic code used in the NEO testing network. ModeTestNet NetMode = 0x74746e41 // 1953787457 // ModePrivNet contains magic code usually used for NEO private networks. ModePrivNet NetMode = 56753 // docker privnet // ModeUnitTestNet is a stub magic code used for testing purposes. ModeUnitTestNet NetMode = 0 )
type ProtocolConfiguration ¶
type ProtocolConfiguration struct {
Magic NetMode `yaml:"Magic"`
AddressVersion byte `yaml:"AddressVersion"`
SecondsPerBlock int `yaml:"SecondsPerBlock"`
LowPriorityThreshold float64 `yaml:"LowPriorityThreshold"`
MaxTransactionsPerBlock int `yaml:"MaxTransactionsPerBlock"`
MemPoolSize int `yaml:"MemPoolSize"`
StandbyValidators []string `yaml:"StandbyValidators"`
SeedList []string `yaml:"SeedList"`
SystemFee SystemFee `yaml:"SystemFee"`
// Whether to verify received blocks.
VerifyBlocks bool `yaml:"VerifyBlocks"`
// Whether to verify transactions in received blocks.
VerifyTransactions bool `yaml:"VerifyTransactions"`
// FreeGasLimit is an amount of GAS which can be spent for free.
FreeGasLimit util.Fixed8 `yaml:"FreeGasLimit"`
// SaveStorageBatch enables storage batch saving before every persist.
SaveStorageBatch bool `yaml:"SaveStorageBatch"`
// Maximum number of low priority transactions accepted into block.
MaxFreeTransactionsPerBlock int `yaml:"MaxFreeTransactionsPerBlock"`
// Maximum size of low priority transaction in bytes.
MaxFreeTransactionSize int `yaml:"MaxFreeTransactionSize"`
// FeePerExtraByte sets the expected per-byte fee for
// transactions exceeding the MaxFreeTransactionSize.
FeePerExtraByte float64 `yaml:"FeePerExtraByte"`
}
ProtocolConfiguration represents the protocol config.
type RPCConfig ¶
type RPCConfig struct {
Enabled bool `yaml:"Enabled"`
EnableCORSWorkaround bool `yaml:"EnableCORSWorkaround"`
Address string `yaml:"Address"`
Port uint16 `yaml:"Port"`
// MaxGasInvoke is a maximum amount of gas which
// can be spent during RPC call.
MaxGasInvoke util.Fixed8 `yaml:"MaxGasInvoke"`
TLSConfig TLSConfig `yaml:"TLSConfig"`
}
RPCConfig is an RPC service configuration information (to be moved to the rpc package, see #423).
type SystemFee ¶
type SystemFee struct {
EnrollmentTransaction int64 `yaml:"EnrollmentTransaction"`
IssueTransaction int64 `yaml:"IssueTransaction"`
PublishTransaction int64 `yaml:"PublishTransaction"`
RegisterTransaction int64 `yaml:"RegisterTransaction"`
}
SystemFee fees related to system.
func (SystemFee) TryGetValue ¶
func (s SystemFee) TryGetValue(txType transaction.TXType) util.Fixed8
TryGetValue returns the system fee base on transaction type.
type TLSConfig ¶
type TLSConfig struct {
Enabled bool `yaml:"Enabled"`
Address string `yaml:"Address"`
Port uint16 `yaml:"Port"`
CertFile string `yaml:"CertFile"`
KeyFile string `yaml:"KeyFile"`
}
TLSConfig describes SSL/TLS configuration.
type WalletConfig ¶
WalletConfig is a wallet info.
Click to show internal directories.
Click to hide internal directories.