Mempool WAL is still created by default in home directory, leads to permission errors (#2758)

* only invoke InitWAL/CloseWAL if WalPath is not empty

Closes #2717

* panic if WAL is not initialized when calling CloseWAL

* add a changelog entry
This commit is contained in:
Anton Kaliaev
2018-11-06 07:39:05 +01:00
committed by Ethan Buchman
parent 7246ffc48f
commit b8a9b0bf78
5 changed files with 37 additions and 33 deletions

View File

@@ -497,6 +497,11 @@ func (cfg *MempoolConfig) WalDir() string {
return rootify(cfg.WalPath, cfg.RootDir)
}
// WalEnabled returns true if the WAL is enabled.
func (cfg *MempoolConfig) WalEnabled() bool {
return cfg.WalPath != ""
}
// ValidateBasic performs basic validation (checking param bounds, etc.) and
// returns an error if any check fails.
func (cfg *MempoolConfig) ValidateBasic() error {