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:
commit
6d13d68f51
|
@ -58,7 +58,7 @@ pub struct BlockchainNode {
|
||||||
|
|
||||||
impl BlockchainNode {
|
impl BlockchainNode {
|
||||||
/// Is the node on the main chain?
|
/// 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 } {
|
if self.block.header == unsafe { (*chain.best_tip).block.header } {
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue