mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-21 10:27:26 +08:00
* print patch number in node-info * rename patchVersion to patchNumber for better differentiation between node version and patch number
52 lines
986 B
Go
52 lines
986 B
Go
package config
|
||
|
||
import (
|
||
"fmt"
|
||
"time"
|
||
)
|
||
|
||
func GetMinimumVersionCutoff() time.Time {
|
||
return time.Date(2025, time.April, 15, 0, 0, 0, 0, time.UTC)
|
||
}
|
||
|
||
// Gets the minimum patch version – This should only be set in a release series
|
||
// if there is something in the patch update that is needed to cut off
|
||
// unupgraded peers. Be sure to update this to 0x00 for any new minor release.
|
||
func GetMinimumPatchNumber() byte {
|
||
return 0x04
|
||
}
|
||
|
||
func GetMinimumVersion() []byte {
|
||
return []byte{0x02, 0x01, 0x00}
|
||
}
|
||
|
||
func GetVersion() []byte {
|
||
return []byte{0x02, 0x01, 0x00}
|
||
}
|
||
|
||
func GetVersionString() string {
|
||
return FormatVersion(GetVersion())
|
||
}
|
||
|
||
func FormatVersion(version []byte) string {
|
||
if len(version) == 3 {
|
||
return fmt.Sprintf(
|
||
"%d.%d.%d",
|
||
version[0], version[1], version[2],
|
||
)
|
||
} else {
|
||
return fmt.Sprintf(
|
||
"%d.%d.%d-p%d",
|
||
version[0], version[1], version[2], version[3],
|
||
)
|
||
}
|
||
}
|
||
|
||
func GetPatchNumber() byte {
|
||
return 0x0b
|
||
}
|
||
|
||
func GetRCNumber() byte {
|
||
return 0x45
|
||
}
|