Skip to content

Commit cdf6879

Browse files
committed
removed getblockbyhash
1 parent 553ec68 commit cdf6879

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

stackslib/src/chainstate/nakamoto/staging_blocks.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -302,25 +302,6 @@ impl<'a> NakamotoStagingBlocksConnRef<'a> {
302302
.optional()?)
303303
}
304304

305-
/// Get the block ID of a staging block from block hash.
306-
/// Used for downloads
307-
pub fn get_block_id_by_block_hash(
308-
&self,
309-
block_hash: &BlockHeaderHash,
310-
) -> Result<Option<StacksBlockId>, ChainstateError> {
311-
let sql = "SELECT index_block_hash FROM nakamoto_staging_blocks WHERE block_hash = ?1";
312-
let args = params![block_hash];
313-
314-
let mut stmt = self.deref().prepare(sql)?;
315-
Ok(stmt
316-
.query_row(args, |row| {
317-
let block_id: StacksBlockId = row.get(0)?;
318-
319-
Ok(block_id)
320-
})
321-
.optional()?)
322-
}
323-
324305
/// Get a Nakamoto block by index block hash, as well as its size.
325306
/// Verifies its integrity.
326307
/// Returns Ok(Some(block, size)) if the block was present

0 commit comments

Comments
 (0)