Skip to content

Commit 0b69eb0

Browse files
author
HuangYi
committed
rename
1 parent e974a61 commit 0b69eb0

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

app/memiavl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func SetupMemIAVL(logger log.Logger, homePath string, appOpts servertypes.AppOpt
2323
// cms must be overridden before the other options, because they may use the cms,
2424
// make sure the cms aren't be overridden by the other options later on.
2525
cms := rootmulti.NewStore(filepath.Join(homePath, "data", "memiavl.db"), logger)
26-
cms.SetAsyncWAL(cast.ToBool(appOpts.Get(FlagAsyncCommit)))
26+
cms.SetAsyncCommit(cast.ToBool(appOpts.Get(FlagAsyncCommit)))
2727
cms.SetZeroCopy(cast.ToBool(appOpts.Get(FlagZeroCopy)))
2828
baseAppOptions = append([]func(*baseapp.BaseApp){setCMS(cms)}, baseAppOptions...)
2929
}

memiavl/db.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ type Options struct {
6464
// load the target version instead of latest version
6565
TargetVersion uint32
6666
// Write WAL asynchronously, it's ok in blockchain case because we can always replay the raw blocks.
67-
AsyncWAL bool
67+
AsyncCommit bool
6868
// ZeroCopy if true, the get and iterator methods could return a slice pointing to mmaped blob files.
6969
ZeroCopy bool
7070
}
@@ -101,7 +101,7 @@ func Load(dir string, opts Options) (*DB, error) {
101101
walChan chan *walEntry
102102
walQuit chan error
103103
)
104-
if opts.AsyncWAL {
104+
if opts.AsyncCommit {
105105
walChan = make(chan *walEntry, 100)
106106
walQuit = make(chan error)
107107
go func() {

store/rootmulti/store.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ type Store struct {
5050

5151
interBlockCache types.MultiStorePersistentCache
5252

53-
asyncWAL bool
54-
zeroCopy bool
53+
asyncCommit bool
54+
zeroCopy bool
5555
}
5656

5757
func NewStore(dir string, logger log.Logger) *Store {
@@ -269,7 +269,7 @@ func (rs *Store) LoadVersionAndUpgrade(version int64, upgrades *types.StoreUpgra
269269
CreateIfMissing: true,
270270
InitialStores: initialStores,
271271
TargetVersion: uint32(version),
272-
AsyncWAL: rs.asyncWAL,
272+
AsyncCommit: rs.asyncCommit,
273273
ZeroCopy: rs.zeroCopy,
274274
})
275275
if err != nil {
@@ -384,8 +384,8 @@ func (rs *Store) SetIAVLDisableFastNode(disable bool) {
384384
func (rs *Store) SetLazyLoading(lazyLoading bool) {
385385
}
386386

387-
func (rs *Store) SetAsyncWAL(async bool) {
388-
rs.asyncWAL = async
387+
func (rs *Store) SetAsyncCommit(async bool) {
388+
rs.asyncCommit = async
389389
}
390390

391391
func (rs *Store) SetZeroCopy(zeroCopy bool) {

0 commit comments

Comments
 (0)