Skip to content

Commit d901503

Browse files
committed
add docs to address PR feedback
1 parent f78c778 commit d901503

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

clarity/src/vm/database/clarity_db.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,14 @@ impl<'a> ClarityDatabase<'a> {
927927
}
928928
}
929929

930+
/// Return the block height for a given tenure height
931+
/// if the block information is queryable for the tenure height.
932+
/// The block information for a given tenure height is queryable iff:
933+
/// * `tenure_height` falls in 2.x, and `tenure_height` < `current_height`
934+
/// * `tenure_height` falls in 3.x, and the first block of the tenure
935+
/// at `tenure_height` has a stacks block height less than `current_height`
936+
///
937+
/// If the block information isn't queryable, return `Ok(None)`
930938
pub fn get_block_height_for_tenure_height(
931939
&mut self,
932940
tenure_height: u32,

stackslib/src/chainstate/nakamoto/coordinator/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ pub fn make_token_transfer(
302302
stx_transfer_signed
303303
}
304304

305-
/// Make a token-transfer from a private key
305+
/// Make contract publish
306306
pub fn make_contract(
307307
chainstate: &mut StacksChainState,
308308
name: &str,

stackslib/src/clarity_vm/database/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ pub trait GetTenureStartId {
4747
tip: &StacksBlockId,
4848
tenure_id_consensus_hash: &ConsensusHash,
4949
) -> Result<Option<TenureBlockId>, DBError>;
50+
/// Return the StacksBlockId of the tenure start block for the
51+
/// tenure with coinbase height `coinbase_height` in the fork
52+
/// referenced by `tip`.
5053
fn get_tenure_block_id_at_cb_height(
5154
&self,
5255
tip: &StacksBlockId,

0 commit comments

Comments
 (0)