code: public long calculateHeight(ImprintNode node) throws HashException {
          LinkedList<ImprintNode> tmpHeads = new LinkedList<>();
          for (ImprintNode in : heads) {
              tmpHeads.add(new ImprintNode(in));
          }
  
          addToHeads(tmpHeads, new ImprintNode(node));
  
          ImprintNode root = getRootNode(tmpHeads);
          logger.debug("Adding node with hash {} and height {}, the hash tree height would be {}", node.getValue(), node.getLevel(),
                  root.getLevel());
          return root.getLevel();
      }
docs: Calculates the height of the hash tree in case a new node would be added.
  
  @param node
  a leaf to be added to the tree, must not be null.
  
  @return Height of the hash tree.
  
  @throws HashException