make sure Version is always set in loadNodeConfig()

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-10-28 12:41:01 +01:00 committed by Jakub
parent 81b0a7b29f
commit 98c861cfe2
2 changed files with 5 additions and 0 deletions

View File

@ -349,6 +349,10 @@ func (b *StatusBackend) loadNodeConfig() (*params.NodeConfig, error) {
if err != nil {
return nil, err
}
// NodeConfig.Version should be taken from params.Version
// which is set at the compile time.
// What's cached is usually outdated so we overwrite it here.
conf.Version = params.Version
return &conf, nil
}

View File

@ -1,6 +1,7 @@
package params
// Version is defined in VERSION file.
// We set it in loadNodeConfig() in api/backend.go.
var Version string
// GitCommit is a commit hash.