Fix version check

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera
2019-12-17 16:26:16 +01:00
parent 30537dd97f
commit 0eb7991bbd
6 changed files with 42 additions and 33 deletions
+3 -5
View File
@@ -4,10 +4,9 @@ import (
"context"
"fmt"
"github.com/filecoin-project/lotus/build"
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/filecoin-project/lotus/build"
)
type Permission = string
@@ -40,7 +39,7 @@ type Version struct {
// this api
//
// See APIVersion in build/version.go
APIVersion uint32
APIVersion build.Version
// TODO: git commit / os / genesis cid?
@@ -49,6 +48,5 @@ type Version struct {
}
func (v Version) String() string {
vM, vm, vp := build.VersionInts(v.APIVersion)
return fmt.Sprintf("%s+api%d.%d.%d", v.Version, vM, vm, vp)
return fmt.Sprintf("%s+api%s", v.Version, v.APIVersion.String())
}