Documentation ¶
Index ¶
Constants ¶
View Source
const ( // NodeIDPrefix is used to denote node addresses rather than other // addresses. NodeIDPrefix string = "NodeID-" // SecretKeyPrefix is used to denote secret keys rather than other byte // arrays. SecretKeyPrefix string = "PrivateKey-" )
View Source
const ( // PlatformName exports the name of the platform PlatformName = "avalanche" // AppName exports the name of the avalanche application AppName = "avalanchego" // ExitCodeDoneMigrating explicitly sets the exit code returned when the migration is finished ExitCodeDoneMigrating = 42 )
Const variables to be exported
View Source
const ( // DefaultHealthCheckExecutionPeriod is the default time between // executions of a health check function DefaultHealthCheckExecutionPeriod = 1 * time.Minute // DefaultHealthCheckInitialDelay ... DefaultHealthCheckInitialDelay = 10 * time.Second // MinConnectedStake is the minimum percentage of the Primary Network's // that this node must be connected to to be considered healthy MinConnectedStake = float64(.80) )
View Source
const ( MainnetID uint32 = 1 CascadeID uint32 = 2 DenaliID uint32 = 3 EverestID uint32 = 4 FujiID uint32 = 5 TestnetID uint32 = FujiID UnitTestID uint32 = 10 LocalID uint32 = 12345 MainnetName = "mainnet" CascadeName = "cascade" DenaliName = "denali" EverestName = "everest" FujiName = "fuji" TestnetName = "testnet" UnitTestName = "testing" LocalName = "local" MainnetHRP = "avax" CascadeHRP = "cascade" DenaliHRP = "denali" EverestHRP = "everest" FujiHRP = "fuji" UnitTestHRP = "testing" LocalHRP = "local" FallbackHRP = "custom" )
Const variables to be exported
View Source
const ( // Request ID used when sending a Put message to gossip an accepted container // (ie not sent in response to a Get) GossipMsgRequestID = math.MaxUint32 )
Const variables to be exported
Variables ¶
View Source
var ( PrimaryNetworkID = ids.Empty PlatformChainID = ids.Empty NetworkIDToNetworkName = map[uint32]string{ MainnetID: MainnetName, CascadeID: CascadeName, DenaliID: DenaliName, EverestID: EverestName, FujiID: FujiName, UnitTestID: UnitTestName, LocalID: LocalName, } NetworkNameToNetworkID = map[string]uint32{ MainnetName: MainnetID, CascadeName: CascadeID, DenaliName: DenaliID, EverestName: EverestID, FujiName: FujiID, TestnetName: TestnetID, UnitTestName: UnitTestID, LocalName: LocalID, } NetworkIDToHRP = map[uint32]string{ MainnetID: MainnetHRP, CascadeID: CascadeHRP, DenaliID: DenaliHRP, EverestID: EverestHRP, FujiID: FujiHRP, UnitTestID: UnitTestHRP, LocalID: LocalHRP, } NetworkHRPToNetworkID = map[string]uint32{ MainnetHRP: MainnetID, CascadeHRP: CascadeID, DenaliHRP: DenaliID, EverestHRP: EverestID, FujiHRP: FujiID, UnitTestHRP: UnitTestID, LocalHRP: LocalID, } ValidNetworkPrefix = "network-" )
Variables to be exported
Functions ¶
func NetworkName ¶ added in v1.0.0
NetworkName returns a human readable name for the network with ID [networkID]
Types ¶
type MsgType ¶ added in v1.0.2
type MsgType int
MsgType ...
const ( NullMsg MsgType = iota GetAcceptedFrontierMsg AcceptedFrontierMsg GetAcceptedFrontierFailedMsg GetAcceptedMsg AcceptedMsg GetAcceptedFailedMsg GetMsg PutMsg GetFailedMsg PushQueryMsg PullQueryMsg ChitsMsg QueryFailedMsg ConnectedMsg DisconnectedMsg NotifyMsg GossipMsg GetAncestorsMsg MultiPutMsg GetAncestorsFailedMsg TimeoutMsg )
Click to show internal directories.
Click to hide internal directories.