Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[config]Fix missing config MptrieLogPath #3769

Merged
merged 3 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ type (
HTTPStatsPort int `yaml:"httpStatsPort"`
StartSubChainInterval time.Duration `yaml:"startSubChainInterval"`
SystemLogDBPath string `yaml:"systemLogDBPath"`
MptrieLogPath string `yaml:"mptrieLogPath"`
}

// Config is the root config struct, each package's config should be put as its sub struct
Expand Down
4 changes: 2 additions & 2 deletions server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ func main() {
livenessCancel()
}()

if cfg.MptrieLogPath != "" {
if err = mptrie.OpenLogDB(cfg.MptrieLogPath); err != nil {
if cfg.System.MptrieLogPath != "" {
if err = mptrie.OpenLogDB(cfg.System.MptrieLogPath); err != nil {
log.L().Fatal("Failed to open mptrie log DB.", zap.Error(err))
}
defer func() {
Expand Down