add get_best_tip_height to blokchain

This commit is contained in:
Tamas Blummer 2018-02-28 20:04:38 +01:00
parent 279e6dec28
commit 50a9d0f51f
1 changed files with 5 additions and 0 deletions

View File

@ -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