def is_consistent(self) -> bool:
        """
        Returns True if number of nodes are consistent with number of leaves
        """
        from ledger.compact_merkle_tree import CompactMerkleTree
        return self.nodeCount == CompactMerkleTree.get_expected_node_count(
            self.leafCount)