Skip to content

Commit

Permalink
add get_best_tip_height to blokchain
Browse files Browse the repository at this point in the history
  • Loading branch information
tamasblummer committed Feb 28, 2018
1 parent 279e6de commit 50a9d0f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/blockdata/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,11 @@ impl Blockchain {
unsafe { &(*self.best_tip).block }
}

/// Returns the best tip height
pub fn best_tip_height(&self) -> u32 {
unsafe { (*self.best_tip).height }
}

/// Returns the best tip's blockhash
pub fn best_tip_hash(&self) -> Sha256dHash {
self.best_hash
Expand Down

0 comments on commit 50a9d0f

Please sign in to comment.