Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // The full version string Version = "1.0.9" // GitCommit is set with --ldflags "-X main.gitCommit=$(git rev-parse HEAD)" GitCommit string Status *UpdateStatus )
Functions ¶
func CompatibleWith ¶ added in v1.0.5
CompatibleWith checks whether the remote peer version is compatible with the node itself. RULES: | local | remote | | - | - | | 1.0.3 | same major&moinor version. | | 1.0.4 | same major version. |
Types ¶
type UpdateStatus ¶ added in v1.0.5
func (*UpdateStatus) AddSeed ¶ added in v1.0.5
func (s *UpdateStatus) AddSeed(seedAddr string)
func (*UpdateStatus) CheckUpdate ¶ added in v1.0.5
func (s *UpdateStatus) CheckUpdate(localVerStr string, remoteVerStr string, remoteAddr string) error
CheckUpdate checks whether there is a newer version to update. If there is, it set the "Status" variable to a proper value.
params: localVerStr: the version of the node itself remoteVerStr: the version received from a seed node. remoteAddr: the version received from a seed node.
current rule:
- small update: seed version is higher than the node itself
- significant update: seed mojor version is higher than the node itself
func (*UpdateStatus) MaxVerSeen ¶ added in v1.0.5
func (s *UpdateStatus) MaxVerSeen() string
func (*UpdateStatus) VersionStatus ¶ added in v1.0.5
func (s *UpdateStatus) VersionStatus() uint16
Click to show internal directories.
Click to hide internal directories.