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§
Sourcefn read_bloom(&self, key: &Cid) -> Result<Option<[u8; 256]>>
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.
Sourcefn write_bloom(
&self,
key: &Cid,
height: ChainEpoch,
bloom: &[u8; 256],
) -> Result<()>
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.
Sourcefn delete_blooms_before_height(&self, height: ChainEpoch) -> Result<()>
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".