Initializer
init(context:dataDirectory:blocksDirectory:)
Creates chainstate manager options.
init(context: Context, dataDirectory: String, blocksDirectory: String? = nil) throws
Parameters
-
context
-
The kernel context that the resulting manager will validate against — its ChainParameters determines genesis and consensus rules.
-
dataDirectory
-
Absolute path to the data directory. Must be writable; created if missing. Houses the block-index and chainstate LevelDB databases.
-
blocksDirectory
-
Absolute path for raw block files. Defaults to dataDirectory + "/blocks"; override only when block storage should live on a different filesystem (e.g. external drive).
Discussion
Throws
KernelError.chainstateManagerOptionsCreationFailed if the directory is inaccessible or on a filesystem the kernel does not support.