code improvement to set trieWriteCacheDisabled flag

This commit is contained in:
amalraj.manigmail.com 2019-07-05 18:43:28 +08:00 committed by Samer Falah
parent e2c12896d2
commit 4268ec00ab
1 changed files with 1 additions and 1 deletions

View File

@ -1473,7 +1473,7 @@ func MakeChain(ctx *cli.Context, stack *node.Node) (chain *core.BlockChain, chai
trieWriteCacheDisabled := ctx.GlobalString(GCModeFlag.Name) == "archive"
//Quorum - set gcmode=archive for Raft
if ctx.GlobalBool(RaftModeFlag.Name) {
if !trieWriteCacheDisabled && ctx.GlobalBool(RaftModeFlag.Name) {
log.Info("set gcmode=archive for Raft")
trieWriteCacheDisabled = true
}