is_on_main_chain is a very useful function upstream, make it public
This commit is contained in:
parent
279e6dec28
commit
5e510366cf
|
@ -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