build: Separate API versions per node type

This commit is contained in:
Łukasz Magiera
2020-09-08 21:14:53 +02:00
parent 3697a1af4d
commit 38863d3025
10 changed files with 58 additions and 12 deletions
+6 -1
View File
@@ -170,9 +170,14 @@ func (a *CommonAPI) ID(context.Context) (peer.ID, error) {
}
func (a *CommonAPI) Version(context.Context) (api.Version, error) {
v, err := build.VersionForType(build.RunningNodeType)
if err != nil {
return api.Version{}, err
}
return api.Version{
Version: build.UserVersion(),
APIVersion: build.APIVersion,
APIVersion: v,
BlockDelay: build.BlockDelaySecs,
}, nil