Skip to content

Commit 553ec68

Browse files
committed
removed get_block_id_by_block_height over staging db
1 parent 5a812fa commit 553ec68

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
@@ -321,25 +321,6 @@ impl<'a> NakamotoStagingBlocksConnRef<'a> {
321321
.optional()?)
322322
}
323323

324-
/// Get the block ID of a staging block from block height.
325-
/// Used for downloads
326-
pub fn get_block_id_by_block_height(
327-
&self,
328-
block_height: u64,
329-
) -> Result<Option<StacksBlockId>, ChainstateError> {
330-
let sql = "SELECT index_block_hash FROM nakamoto_staging_blocks WHERE height = ?1";
331-
let args = params![block_height];
332-
333-
let mut stmt = self.deref().prepare(sql)?;
334-
Ok(stmt
335-
.query_row(args, |row| {
336-
let block_id: StacksBlockId = row.get(0)?;
337-
338-
Ok(block_id)
339-
})
340-
.optional()?)
341-
}
342-
343324
/// Get a Nakamoto block by index block hash, as well as its size.
344325
/// Verifies its integrity.
345326
/// Returns Ok(Some(block, size)) if the block was present

0 commit comments

Comments
 (0)