github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/iavl/options.go (about)

     1  package iavl
     2  
     3  // Options define tree options.
     4  type Options struct {
     5  	// Sync synchronously flushes all writes to storage, using e.g. the fsync syscall.
     6  	// Disabling this significantly improves performance, but can lose data on e.g. power loss.
     7  	Sync bool
     8  
     9  	// InitialVersion specifies the initial version number. If any versions already exist below
    10  	// this, an error is returned when loading the tree. Only used for the initial SaveVersion()
    11  	// call.
    12  	InitialVersion uint64
    13  	UpgradeVersion uint64
    14  }
    15  
    16  // DefaultOptions returns the default options for IAVL.
    17  func DefaultOptions() Options {
    18  	return Options{}
    19  }