Skip to content

Commit 35f6e94

Browse files
committed
add options
1 parent b7bfb3a commit 35f6e94

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

mutable_tree.go

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ func NewMutableTree(db corestore.KVStoreWithBatch, cacheSize int, skipFastStorag
6363
unsavedFastNodeRemovals: &sync.Map{},
6464
ndb: ndb,
6565
skipFastStorageUpgrade: skipFastStorageUpgrade,
66+
initialVersionSet: opts.initialVersionSet,
6667
}
6768
}
6869

options.go

+3
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ type Options struct {
8787

8888
// AsyncPruning is a flag to enable async pruning
8989
AsyncPruning bool
90+
91+
initialVersionSet bool
9092
}
9193

9294
// DefaultOptions returns the default options for IAVL.
@@ -105,6 +107,7 @@ func SyncOption(sync bool) Option {
105107
func InitialVersionOption(iv uint64) Option {
106108
return func(opts *Options) {
107109
opts.InitialVersion = iv
110+
opts.initialVersionSet = true
108111
}
109112
}
110113

0 commit comments

Comments
 (0)