fix: config for VoteJournalDir and BLSWalletDir (#1566)

This commit is contained in:
NathanBSC 2023-05-04 17:25:31 +08:00 committed by GitHub
parent bc72d5e708
commit a7bdb363ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1403,7 +1403,7 @@ func setVoteJournalDir(ctx *cli.Context, cfg *node.Config) {
dataDir := cfg.DataDir
if ctx.GlobalIsSet(VoteJournalDirFlag.Name) {
cfg.VoteJournalDir = ctx.GlobalString(VoteJournalDirFlag.Name)
} else {
} else if cfg.VoteJournalDir == "" {
cfg.VoteJournalDir = filepath.Join(dataDir, "voteJournal")
}
}
@ -1412,7 +1412,7 @@ func setBLSWalletDir(ctx *cli.Context, cfg *node.Config) {
dataDir := cfg.DataDir
if ctx.GlobalIsSet(BLSWalletDirFlag.Name) {
cfg.BLSWalletDir = ctx.GlobalString(BLSWalletDirFlag.Name)
} else {
} else if cfg.BLSWalletDir == "" {
cfg.BLSWalletDir = filepath.Join(dataDir, "bls/wallet")
}
}