main+lnd: display build.Version() for commit hash

This commit is contained in:
Conner Fromknecht
2018-09-20 03:26:58 -07:00
parent 97fd56cf47
commit 0903fe3183
3 changed files with 8 additions and 7 deletions

9
lnd.go
View File

@@ -37,6 +37,8 @@ import (
"github.com/btcsuite/btcwallet/wallet"
proxy "github.com/grpc-ecosystem/grpc-gateway/runtime"
flags "github.com/jessevdk/go-flags"
"github.com/lightningnetwork/lnd/build"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/keychain"
"github.com/lightningnetwork/lnd/lncfg"
@@ -54,10 +56,6 @@ const (
)
var (
// Commit stores the current commit hash of this build. This should be
// set using -ldflags during compilation.
Commit string
cfg *config
registeredChains = newChainRegistry()
@@ -108,7 +106,8 @@ func lndMain() error {
}()
// Show version at startup.
ltndLog.Infof("Version %s", version())
ltndLog.Infof("Version: %s, build=%s, logging=%s",
build.Version(), build.Deployment, build.LoggingType)
var network string
switch {