pub struct ChainstateManagerOptions { /* private fields */ }Expand description
Holds the configuration options for creating a new ChainstateManager
Implementations§
Source§impl ChainstateManagerOptions
impl ChainstateManagerOptions
Sourcepub fn new(
context: &Context,
data_dir: &str,
blocks_dir: &str,
) -> Result<Self, KernelError>
pub fn new( context: &Context, data_dir: &str, blocks_dir: &str, ) -> Result<Self, KernelError>
Create a new option
§Arguments
context- TheChainstateManagerfor which these options are created has to use the sameContext.data_dir- The directory into which theChainstateManagerwill write its data.
Sourcepub fn set_worker_threads(&self, worker_threads: i32)
pub fn set_worker_threads(&self, worker_threads: i32)
Set the number of worker threads used by script validation
Sourcepub fn set_wipe_db(self, wipe_block_tree: bool, wipe_chainstate: bool) -> Self
pub fn set_wipe_db(self, wipe_block_tree: bool, wipe_chainstate: bool) -> Self
Wipe the block tree or chainstate dbs. When wiping the block tree db the chainstate db has to be wiped too. Wiping the databases will triggere a rebase once import blocks is called.
Sourcepub fn set_block_tree_db_in_memory(self, block_tree_db_in_memory: bool) -> Self
pub fn set_block_tree_db_in_memory(self, block_tree_db_in_memory: bool) -> Self
Run the block tree db in-memory only. No database files will be written to disk.
Sourcepub fn set_chainstate_db_in_memory(self, chainstate_db_in_memory: bool) -> Self
pub fn set_chainstate_db_in_memory(self, chainstate_db_in_memory: bool) -> Self
Run the chainstate db in-memory only. No database files will be written to disk.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChainstateManagerOptions
impl RefUnwindSafe for ChainstateManagerOptions
impl !Send for ChainstateManagerOptions
impl !Sync for ChainstateManagerOptions
impl Unpin for ChainstateManagerOptions
impl UnwindSafe for ChainstateManagerOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more