From f1cc73e218e21cd54fbfa9017753cf6b35b43d45 Mon Sep 17 00:00:00 2001 From: Jamie Holdstock Date: Mon, 28 Mar 2022 16:37:12 +0100 Subject: [PATCH] Add mainnet pre-release warning. Make the existing startup warning more obvious, and add a new one for when a pre-release version of vspd is used on mainnet. --- vspd.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/vspd.go b/vspd.go index f9922e1..00c0bd7 100644 --- a/vspd.go +++ b/vspd.go @@ -55,9 +55,17 @@ func run(ctx context.Context) error { log.Infof("Version %s (Go version %s %s/%s)", version.String(), runtime.Version(), runtime.GOOS, runtime.GOARCH) + if cfg.netParams == &mainNetParams && + version.PreRelease != "" { + log.Warnf("") + log.Warnf("\tWARNING: This is a pre-release version of vspd which should not be used on mainnet.") + log.Warnf("") + } + if cfg.VspClosed { - log.Warnf("Config --vspclosed is set. This will prevent vspd from " + - "accepting new tickets.") + log.Warnf("") + log.Warnf("\tWARNING: Config --vspclosed is set. This will prevent vspd from accepting new tickets.") + log.Warnf("") } // WaitGroup for services to signal when they have shutdown cleanly.