diff --git a/config.go b/config.go index c1405999..c2e30ee9 100644 --- a/config.go +++ b/config.go @@ -89,6 +89,7 @@ type config struct { PoolEmail string `long:"poolemail" description:"Email address to for support inquiries"` PoolFees float64 `long:"poolfees" description:"The per-ticket fees the user must send to the pool with their tickets"` PoolLink string `long:"poollink" description:"URL for support inquiries such as forum, IRC, etc"` + NewVspLink string `long:"newvsplink" description:"URL to new vspd"` RealIPHeader string `long:"realipheader" description:"The name of an HTTP request header containing the actual remote client IP address, typically set by a reverse proxy. An empty string (default) indicates to use net/Request.RemodeAddr."` SMTPFrom string `long:"smtpfrom" description:"From address to use on outbound mail"` SMTPHost string `long:"smtphost" description:"SMTP hostname/ip and port, e.g. mail.example.com:25"` diff --git a/controllers/main.go b/controllers/main.go index a6814197..54862e60 100644 --- a/controllers/main.go +++ b/controllers/main.go @@ -61,6 +61,7 @@ type Config struct { PoolEmail string PoolFees float64 PoolLink string + NewVspLink string RealIPHeader string MaxVotedTickets int Description string @@ -1195,6 +1196,8 @@ func (controller *MainController) Index(c web.C, r *http.Request) (string, int) if controller.Cfg.ClosePool { c.Env["IsClosed"] = true c.Env["ClosePoolMsg"] = controller.Cfg.ClosePoolMsg + c.Env["NewVspLink"] = controller.Cfg.NewVspLink + c.Env["Designation"] = controller.Cfg.Designation } c.Env["Network"] = controller.Cfg.NetParams.Name c.Env["PoolEmail"] = controller.Cfg.PoolEmail diff --git a/server.go b/server.go index fd5d58a8..f2931f6b 100644 --- a/server.go +++ b/server.go @@ -59,6 +59,10 @@ func runMain(ctx context.Context) error { cfg = loadedCfg log.Infof("Network: %s", activeNetParams.Params.Name) + if cfg.ClosePool && cfg.NewVspLink == "" { + log.Warn("Config Warning: New vsp link is not set") + } + defer func() { if logRotator != nil { logRotator.Close() @@ -107,6 +111,7 @@ func runMain(ctx context.Context) error { PoolEmail: cfg.PoolEmail, PoolFees: cfg.PoolFees, PoolLink: cfg.PoolLink, + NewVspLink: cfg.NewVspLink, RealIPHeader: cfg.RealIPHeader, MaxVotedTickets: cfg.MaxVotedTickets, Description: cfg.Description, @@ -161,8 +166,7 @@ func runMain(ctx context.Context) error { err = controller.RPCSync(ctx, application.DbMap) if err != nil { - return fmt.Errorf("failed to sync the wallets: %v", - err) + return fmt.Errorf("failed to sync the wallets: %v", err) } // Set up web server routes diff --git a/views/home.html b/views/home.html index 1a6f7a2b..964f9072 100644 --- a/views/home.html +++ b/views/home.html @@ -4,6 +4,25 @@
+ {{ if .IsClosed}} +
+

+ This Voting Service Provider is closed +

+

+ {{ .ClosePoolMsg }} +

+

+ {{if not .NewVspLink}} + Visit decred.org to find a new VSP. + {{else}} + Visit the new {{.Designation}} to vote. + {{end}} +
+ Visit Decred’s Blog to find out more about the migration to a new VSP implementation. +

+
+ {{ end }}

Voting Service Provider Overview