Skip to main content

EthBlockBloomStore

Trait EthBlockBloomStore 

Source
pub trait EthBlockBloomStore {
    // Required methods
    fn read_bloom(&self, key: &Cid) -> Result<Option<[u8; 256]>>;
    fn write_bloom(
        &self,
        key: &Cid,
        height: ChainEpoch,
        bloom: &[u8; 256],
    ) -> Result<()>;
    fn delete_blooms_before_height(&self, height: ChainEpoch) -> Result<()>;
}
Expand description

Interface used to store and retrieve per-tipset Ethereum block logs blooms.

Required Methods§

Source

fn read_bloom(&self, key: &Cid) -> Result<Option<[u8; 256]>>

Reads the logs bloom stored for the given tipset key CID. A missing or malformed entry is reported as None.

Source

fn write_bloom( &self, key: &Cid, height: ChainEpoch, bloom: &[u8; 256], ) -> Result<()>

Stores the logs bloom for the given tipset key CID, tagged with its height.

Source

fn delete_blooms_before_height(&self, height: ChainEpoch) -> Result<()>

Deletes every stored bloom whose height is below height.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + EthBlockBloomStore + ?Sized> EthBlockBloomStore for &'a T

Source§

fn read_bloom(&self, key: &Cid) -> Result<Option<[u8; 256]>>

Source§

fn write_bloom( &self, key: &Cid, height: ChainEpoch, bloom: &[u8; 256], ) -> Result<()>

Source§

fn delete_blooms_before_height(&self, height: ChainEpoch) -> Result<()>

Implementors§