ceremonyclient/node/config/version.go
Marius Scurtescu a0659fec83
add -node-info command (#141)
* add version label and trim repo url

* add README for protobufs

* add version to NodeInfoResponse

* add docker login task

* remove version from docker compose file

* return version with GetNodeInfo response

* add basic -node-info flag

* print max frame as well with -node-info

* expand protobuf README

* update node command examples to use node binary and make log commands follow

* return all of NodeInfo

* extract FormatVersion

* print version of running process
2024-03-24 03:11:58 -05:00

30 lines
479 B
Go

package config
import (
"fmt"
"time"
)
func GetMinimumVersionCutoff() time.Time {
return time.Date(2024, time.March, 21, 5, 00, 0, 0, time.UTC)
}
func GetMinimumVersion() []byte {
return []byte{0x01, 0x04, 0x0B}
}
func GetVersion() []byte {
return []byte{0x01, 0x04, 0x0C}
}
func GetVersionString() string {
return FormatVersion(GetVersion())
}
func FormatVersion(version []byte) string {
return fmt.Sprintf(
"%d.%d.%d",
version[0], version[1], version[2],
)
}