|
7 | 7 | "fmt"
|
8 | 8 | "net"
|
9 | 9 | "net/http"
|
| 10 | + _ "net/http/pprof" // nolint: gosec // securely exposed on separate, optional port |
10 | 11 | "strings"
|
11 | 12 | "time"
|
12 | 13 |
|
@@ -53,8 +54,6 @@ import (
|
53 | 54 | tmtime "github.com/Finschia/ostracon/types/time"
|
54 | 55 | "github.com/Finschia/ostracon/version"
|
55 | 56 |
|
56 |
| - _ "net/http/pprof" // nolint: gosec // securely exposed on separate, optional port |
57 |
| - |
58 | 57 | _ "github.com/lib/pq" // provide the psql db driver
|
59 | 58 | )
|
60 | 59 |
|
@@ -124,7 +123,7 @@ func NewOstraconNode(config *cfg.Config, logger log.Logger) (*Node, error) {
|
124 | 123 | }
|
125 | 124 |
|
126 | 125 | var privKey types.PrivValidator
|
127 |
| - if config.PrivValidatorListenAddr == "" { |
| 126 | + if strings.TrimSpace(config.PrivValidatorListenAddr) == "" { |
128 | 127 | privKey = privval.LoadFilePV(
|
129 | 128 | config.PrivValidatorKeyFile(),
|
130 | 129 | config.PrivValidatorStateFile())
|
@@ -792,7 +791,7 @@ func NewNode(config *cfg.Config,
|
792 | 791 |
|
793 | 792 | // If an address is provided, listen on the socket for a connection from an
|
794 | 793 | // external signing process.
|
795 |
| - if config.PrivValidatorListenAddr != "" { |
| 794 | + if strings.TrimSpace(config.PrivValidatorListenAddr) != "" { |
796 | 795 | // FIXME: we should start services inside OnStart
|
797 | 796 | privValidator, err = CreateAndStartPrivValidatorSocketClient(config, genDoc.ChainID, logger)
|
798 | 797 | if err != nil {
|
|
0 commit comments