code: public static Collection<Integer> compareTrees(MerkleTreeView local, MerkleTreeView remote) {
          Collection<Integer> deltaOrders = new LinkedList<Integer>();
          MerkleTreeView baseTree = local.depth() <= remote.depth() ? local : remote;
          MerkleTreeView otherTree = local.depth() <= remote.depth() ? remote : local;
          int leafLevel = baseTree.depth() - 1;
          int numberOfLeaves = getNodesOnLevel(leafLevel);
          int leftMostLeaf = getLeftMostNodeOrderOnLevel(leafLevel);
  
          for (int leafOrder = leftMostLeaf; leafOrder < leftMostLeaf + numberOfLeaves; leafOrder++) {
              if (baseTree.getNodeHash(leafOrder) != otherTree.getNodeHash(leafOrder)) {
                  deltaOrders.add(leafOrder);
              }
          }
  
          return deltaOrders;
      }
docs: Compares the provided local and the remote Merkle trees and
  returns the breadth-first orders of the leaves that found to be
  different.
  <p>
  This method compares only the leaves instead of traversing only
  the subtrees that are different. This way possible hash collisions
  inside the tree don't remain hidden and then syncing the clusters
  can be initiated. This comes at the cost of comparing every leaf
  at every comparison.
  
  @param local  The view of the local Merkle tree
  @param remote The view of the remote Merkle tree
  @return the order of the leaves found to be different