Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultCacheSize = 1000
View Source
const DefaultConfigTemplate = `` /* 1209-byte string literal not displayed */
DefaultConfigTemplate defines the configuration template for the EVM RPC configuration
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
config.Config
MemIAVL MemIAVLConfig `mapstructure:"memiavl"`
}
type MemIAVLConfig ¶
type MemIAVLConfig struct {
// Enable defines if the memiavl should be enabled.
Enable bool `mapstructure:"enable"`
// ZeroCopy defines if the memiavl should return slices pointing to mmap-ed buffers directly (zero-copy),
// the zero-copied slices must not be retained beyond current block's execution.
ZeroCopy bool `mapstructure:"zero-copy"`
// AsyncCommitBuffer defines the size of asynchronous commit queue, this greatly improve block catching-up
// performance, -1 means synchronous commit.
AsyncCommitBuffer int `mapstructure:"async-commit-buffer"`
// SnapshotKeepRecent defines what many old snapshots (excluding the latest one) to keep after new snapshots are taken.
SnapshotKeepRecent uint32 `mapstructure:"snapshot-keep-recent"`
// SnapshotInterval defines the block interval the memiavl snapshot is taken, default to 1000.
SnapshotInterval uint32 `mapstructure:"snapshot-interval"`
// CacheSize defines the size of the cache for each memiavl store.
CacheSize int `mapstructure:"cache-size"`
}
func DefaultMemIAVLConfig ¶
func DefaultMemIAVLConfig() MemIAVLConfig
Click to show internal directories.
Click to hide internal directories.