This commit is contained in:
Callum Waters
2022-10-26 17:07:23 +02:00
parent da8810f480
commit a2610a9998
3 changed files with 5 additions and 10 deletions

View File

@@ -76,7 +76,7 @@ type Node struct {
blockIndexer indexer.BlockIndexer
indexerService *txindex.IndexerService
prometheusSrv *http.Server
pprofSrv *http.Server
pprofSrv *http.Server
}
// Option sets a parameter for the node.
@@ -393,7 +393,6 @@ func (n *Node) OnStart() error {
n.rpcListeners = listeners
}
// Start the transport.
addr, err := p2p.NewNetAddressString(p2p.IDAddressString(n.nodeKey.ID(), n.config.P2P.ListenAddress))
if err != nil {
@@ -674,8 +673,8 @@ func (n *Node) startPrometheusServer() *http.Server {
// starts a ppro
func (n *Node) startPprofServer() *http.Server {
srv := &http.Server{
Addr: n.config.RPC.PprofListenAddress,
Handler: nil,
Addr: n.config.RPC.PprofListenAddress,
Handler: nil,
ReadHeaderTimeout: readHeaderTimeout,
}
go func() {
@@ -820,4 +819,3 @@ func makeNodeInfo(
err := nodeInfo.Validate()
return nodeInfo, err
}

View File

@@ -44,7 +44,6 @@ import (
_ "github.com/lib/pq" // provide the psql db driver
)
// DBContext specifies config information for loading a new DB.
type DBContext struct {
ID string
@@ -123,7 +122,6 @@ type blockSyncReactor interface {
//------------------------------------------------------------------------------
func initDBs(config *cfg.Config, dbProvider DBProvider) (blockStore *store.BlockStore, stateDB dbm.DB, err error) {
var blockStoreDB dbm.DB
blockStoreDB, err = dbProvider(&DBContext{"blockstore", config})
@@ -592,7 +590,6 @@ func startStateSync(ssR *statesync.Reactor, bcR blockSyncReactor, conR *cs.React
return nil
}
//------------------------------------------------------------------------------
var genesisDocKey = []byte("genesisDoc")
@@ -711,4 +708,4 @@ func splitAndTrimEmpty(s, sep, cutset string) []string {
}
}
return nonEmptyStrings
}
}