mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-06 16:17:11 +00:00
Ensure *_wal_dir exists
This commit is contained in:
@@ -87,8 +87,14 @@ func NewMempool(config cfg.Config, proxyAppConn proxy.AppConnMempool) *Mempool {
|
||||
func (mem *Mempool) initWAL() {
|
||||
walDir := mem.config.GetString("mempool_wal_dir")
|
||||
if walDir != "" {
|
||||
err := EnsureDir(walDir, 0700)
|
||||
if err != nil {
|
||||
log.Error("Error ensuring Mempool wal dir", "error", err)
|
||||
PanicSanity(err)
|
||||
}
|
||||
af, err := auto.OpenAutoFile(walDir + "/wal")
|
||||
if err != nil {
|
||||
log.Error("Error opening Mempool wal file", "error", err)
|
||||
PanicSanity(err)
|
||||
}
|
||||
mem.wal = af
|
||||
|
||||
Reference in New Issue
Block a user