Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yzang2019 committed May 10, 2024
1 parent 67bf6d4 commit be2dcab
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions sc/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,15 @@ func (cs *CommitStore) LoadVersion(targetVersion int64, copyExisting bool) (type
db: db,
opts: opts,
}, nil
} else {
if cs.db != nil {
cs.db.Close()
}
db, err := memiavl.OpenDB(cs.logger, targetVersion, cs.opts)
if err != nil {
return nil, err
}
cs.db = db
}
if cs.db != nil {
cs.db.Close()
}
db, err := memiavl.OpenDB(cs.logger, targetVersion, cs.opts)
if err != nil {
return nil, err
}
cs.db = db
return cs, nil
}

Expand Down

0 comments on commit be2dcab

Please sign in to comment.