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.
This commit is contained in:
Jamie Holdstock 2022-03-28 16:37:12 +01:00 committed by GitHub
parent 37d51df546
commit f1cc73e218
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

12
vspd.go
View File

@ -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.