mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 11:41:51 +00:00
Fix store.block_exists and HTTP header API
This commit is contained in:
@@ -601,10 +601,14 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
||||
.map(|payload| payload.is_some())
|
||||
}
|
||||
|
||||
/// Determine whether a block exists in the database.
|
||||
/// Determine whether a block exists in the database (hot *or* cold).
|
||||
pub fn block_exists(&self, block_root: &Hash256) -> Result<bool, Error> {
|
||||
self.hot_db
|
||||
.key_exists(DBColumn::BeaconBlock.into(), block_root.as_bytes())
|
||||
Ok(self
|
||||
.hot_db
|
||||
.key_exists(DBColumn::BeaconBlock.into(), block_root.as_bytes())?
|
||||
|| self
|
||||
.cold_db
|
||||
.key_exists(DBColumn::BeaconBlock.into(), block_root.as_bytes())?)
|
||||
}
|
||||
|
||||
/// Delete a block from the store and the block cache.
|
||||
|
||||
Reference in New Issue
Block a user