mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
chore(db): remove block numhash key (#1242)
This commit is contained in:
@@ -134,7 +134,7 @@ where
|
||||
.ok_or(DownloadError::MissingHeader { block_number: current_block_num })?;
|
||||
// Find the block header.
|
||||
let (_, header) = header_cursor
|
||||
.seek_exact((number, hash).into())?
|
||||
.seek_exact(number)?
|
||||
.ok_or(DownloadError::MissingHeader { block_number: number })?;
|
||||
|
||||
// If the header is not empty, increment the counter
|
||||
|
||||
@@ -50,7 +50,7 @@ pub(crate) fn insert_headers(db: &Env<WriteMap>, headers: &[SealedHeader]) {
|
||||
db.update(|tx| -> Result<(), db::Error> {
|
||||
for header in headers {
|
||||
tx.put::<tables::CanonicalHeaders>(header.number, header.hash())?;
|
||||
tx.put::<tables::Headers>(header.num_hash().into(), header.clone().unseal())?;
|
||||
tx.put::<tables::Headers>(header.number, header.clone().unseal())?;
|
||||
}
|
||||
Ok(())
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user