Merge pull request #51 from tamasblummer/is_on_main_chain_public2

[Trivial] is_on_main_chain is a very useful function upstream, make it public
This commit is contained in:
Andrew Poelstra 2018-03-09 15:20:25 +00:00 committed by GitHub
commit 6d13d68f51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ pub struct BlockchainNode {
impl BlockchainNode {
/// Is the node on the main chain?
fn is_on_main_chain(&self, chain: &Blockchain) -> bool {
pub fn is_on_main_chain(&self, chain: &Blockchain) -> bool {
if self.block.header == unsafe { (*chain.best_tip).block.header } {
true
} else {