pub struct BitcoindCache {
pub store: AnyStore,
pub network: Network,
}Fields§
§store: AnyStore§network: NetworkImplementations§
Source§impl BitcoindCache
impl BitcoindCache
pub fn new(network: Network, store: AnyStore) -> Self
pub fn best_block_hash_path(&self) -> String
pub fn best_block_height_path(&self) -> String
pub fn header_path(&self, block_hash: String) -> String
pub fn block_path(&self, block_hash: String) -> String
pub async fn put_best_block_hash( &self, block_hash: &BlockHash, ) -> BitcoindCacheResult<()>
pub async fn put_best_block_height( &self, block_height: u32, ) -> BitcoindCacheResult<()>
pub async fn put_block(&self, block: &Block) -> BitcoindCacheResult<()>
pub async fn put_header( &self, header: &BlockHeader, height: u32, chainwork: Uint256, ) -> BitcoindCacheResult<()>
pub async fn get_header_by_hash( &self, hash: &BlockHash, ) -> BitcoindCacheResult<Option<(BlockHeader, u32, Uint256)>>
pub async fn get_block_by_hash( &self, hash: &BlockHash, ) -> BitcoindCacheResult<Option<Block>>
pub async fn get_best_block_hash( &self, ) -> BitcoindCacheResult<Option<BlockHash>>
pub async fn get_best_block_height(&self) -> BitcoindCacheResult<Option<u32>>
pub async fn get_cached_best_block( &self, ) -> BitcoindCacheResult<(BlockHash, u32)>
pub async fn block_connected( &self, block: &Block, height: u32, chainwork: Uint256, ) -> BitcoindCacheResult<()>
Trait Implementations§
Source§impl Clone for BitcoindCache
impl Clone for BitcoindCache
Source§fn clone(&self) -> BitcoindCache
fn clone(&self) -> BitcoindCache
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BitcoindCache
impl RefUnwindSafe for BitcoindCache
impl Send for BitcoindCache
impl Sync for BitcoindCache
impl Unpin for BitcoindCache
impl UnwindSafe for BitcoindCache
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