|
@ -13,8 +13,8 @@ import ( |
|
|
|
|
|
|
|
|
"github.com/prometheus/client_golang/prometheus" |
|
|
"github.com/prometheus/client_golang/prometheus" |
|
|
"github.com/prometheus/client_golang/prometheus/promhttp" |
|
|
"github.com/prometheus/client_golang/prometheus/promhttp" |
|
|
"github.com/tendermint/go-amino" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
amino "github.com/tendermint/go-amino" |
|
|
abci "github.com/tendermint/tendermint/abci/types" |
|
|
abci "github.com/tendermint/tendermint/abci/types" |
|
|
bc "github.com/tendermint/tendermint/blockchain" |
|
|
bc "github.com/tendermint/tendermint/blockchain" |
|
|
cfg "github.com/tendermint/tendermint/config" |
|
|
cfg "github.com/tendermint/tendermint/config" |
|
@ -279,7 +279,9 @@ func NewNode(config *cfg.Config, |
|
|
) |
|
|
) |
|
|
mempoolLogger := logger.With("module", "mempool") |
|
|
mempoolLogger := logger.With("module", "mempool") |
|
|
mempool.SetLogger(mempoolLogger) |
|
|
mempool.SetLogger(mempoolLogger) |
|
|
mempool.InitWAL() // no need to have the mempool wal during tests
|
|
|
|
|
|
|
|
|
if config.Mempool.WalEnabled() { |
|
|
|
|
|
mempool.InitWAL() // no need to have the mempool wal during tests
|
|
|
|
|
|
} |
|
|
mempoolReactor := mempl.NewMempoolReactor(config.Mempool, mempool) |
|
|
mempoolReactor := mempl.NewMempoolReactor(config.Mempool, mempool) |
|
|
mempoolReactor.SetLogger(mempoolLogger) |
|
|
mempoolReactor.SetLogger(mempoolLogger) |
|
|
|
|
|
|
|
@ -586,6 +588,11 @@ func (n *Node) OnStop() { |
|
|
// TODO: gracefully disconnect from peers.
|
|
|
// TODO: gracefully disconnect from peers.
|
|
|
n.sw.Stop() |
|
|
n.sw.Stop() |
|
|
|
|
|
|
|
|
|
|
|
// stop mempool WAL
|
|
|
|
|
|
if n.config.Mempool.WalEnabled() { |
|
|
|
|
|
n.mempoolReactor.Mempool.CloseWAL() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if err := n.transport.Close(); err != nil { |
|
|
if err := n.transport.Close(); err != nil { |
|
|
n.Logger.Error("Error closing transport", "err", err) |
|
|
n.Logger.Error("Error closing transport", "err", err) |
|
|
} |
|
|
} |
|
|