Skip to content

Commit

Permalink
feat: implement get_stacks_height_for_tenure_height
Browse files Browse the repository at this point in the history
  • Loading branch information
hugocaillard committed Oct 21, 2024
1 parent 48e26eb commit 0d07ef9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions components/clarity-repl/src/repl/datastore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ impl Datastore {

let sortition_lookup = HashMap::from([(sortition_id, id)]);
let consensus_hash_lookup = HashMap::from([(genesis_block.consensus_hash, sortition_id)]);
let tenure_blocks_height = HashMap::from([0, 0]);
let tenure_blocks_height = HashMap::from([(0, 0)]);
let burn_blocks = HashMap::from([(first_burn_block_header_hash, genesis_burn_block)]);
let stacks_blocks = HashMap::from([(id, genesis_block)]);

Expand Down Expand Up @@ -598,10 +598,10 @@ impl HeadersDB for Datastore {

fn get_stacks_height_for_tenure_height(
&self,
id_bhh: &StacksBlockId,
_tenure_height: u32,
_id_bhh: &StacksBlockId,
tenure_height: u32,
) -> Option<u32> {
self.tenure_blocks_height.get(&tenure_height)
self.tenure_blocks_height.get(&tenure_height).copied()
}

fn get_miner_address(
Expand Down

0 comments on commit 0d07ef9

Please # to comment.