Struct ChainstateManagerOptions

Source
pub struct ChainstateManagerOptions { /* private fields */ }
Expand description

Holds the configuration options for creating a new ChainstateManager

Implementations§

Source§

impl ChainstateManagerOptions

Source

pub fn new( context: &Context, data_dir: &str, blocks_dir: &str, ) -> Result<Self, KernelError>

Create a new option

§Arguments
Source

pub fn set_worker_threads(&self, worker_threads: i32)

Set the number of worker threads used by script validation

Source

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.

Source

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.

Source

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§

Source§

impl Drop for ChainstateManagerOptions

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.