Struct bitcoin_index::BaseIndexDB
source · pub struct BaseIndexDB { /* private fields */ }
Expand description
The database stores a block locator of the chain the database is synced to so that the index can efficiently determine the point it last stopped at.
A locator is used instead of a simple hash of the chain tip because blocks and block index entries may not be flushed to disk until after this database is updated.
Implementations§
source§impl BaseIndexDB
impl BaseIndexDB
pub fn new( path: &Path, n_cache_size: usize, memory: Option<bool>, wipe: Option<bool>, obfuscate: Option<bool> ) -> Self
sourcepub fn read_best_block(&self, locator: &mut BlockLocator) -> bool
pub fn read_best_block(&self, locator: &mut BlockLocator) -> bool
| Read block locator of the chain that | the txindex is in sync with. |
sourcepub fn write_best_block(&mut self, batch: &mut DBBatch, locator: &BlockLocator)
pub fn write_best_block(&mut self, batch: &mut DBBatch, locator: &BlockLocator)
| Write block locator of the chain that | the txindex is in sync with. |
Auto Trait Implementations§
impl !RefUnwindSafe for BaseIndexDB
impl !Send for BaseIndexDB
impl !Sync for BaseIndexDB
impl Unpin for BaseIndexDB
impl !UnwindSafe for BaseIndexDB
Blanket Implementations§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more