pub trait BlockFilterStore: Send + Sync {
// Required methods
fn get_filter(&self, block_height: u32) -> Option<BlockFilter>;
fn put_filter(&self, block_height: u32, block_filter: BlockFilter);
fn put_height(&self, height: u32);
fn get_height(&self) -> Option<u32>;
}
Expand description
A database that stores our compact filters
Required Methods§
sourcefn get_filter(&self, block_height: u32) -> Option<BlockFilter>
fn get_filter(&self, block_height: u32) -> Option<BlockFilter>
Fetches a block filter
sourcefn put_filter(&self, block_height: u32, block_filter: BlockFilter)
fn put_filter(&self, block_height: u32, block_filter: BlockFilter)
Stores a new filter
sourcefn put_height(&self, height: u32)
fn put_height(&self, height: u32)
Persists the height of the last filter we have
sourcefn get_height(&self) -> Option<u32>
fn get_height(&self) -> Option<u32>
Fetches the height of the last filter we have