code: private void rollingRemove() throws TTException {
          final ITreeData startNode = mDelegate.getCurrentNode();
          long hashToRemove = startNode.getHash();
          long hashToAdd = 0;
          long newHash = 0;
          // go the path to the root
          do {
              synchronized (mDelegate.getCurrentNode()) {
                  getPtx().getData(mDelegate.getCurrentNode().getDataKey());
                  if (mDelegate.getCurrentNode().getDataKey() == startNode.getDataKey()) {
                      // the begin node is always null
                      newHash = 0;
                  } else if (mDelegate.getCurrentNode().getDataKey() == startNode.getParentKey()) {
                      // the parent node is just removed
                      newHash = mDelegate.getCurrentNode().getHash() - (hashToRemove * PRIME);
                      hashToRemove = mDelegate.getCurrentNode().getHash();
                  } else {
                      // the ancestors are all touched regarding the modification
                      newHash = mDelegate.getCurrentNode().getHash() - (hashToRemove * PRIME);
                      newHash = newHash + hashToAdd * PRIME;
                      hashToRemove = mDelegate.getCurrentNode().getHash();
                  }
                  mDelegate.getCurrentNode().setHash(newHash);
                  hashToAdd = newHash;
                  getPtx().setData(mDelegate.getCurrentNode());
              }
          } while (moveTo(mDelegate.getCurrentNode().getParentKey()));
  
          mDelegate.setCurrentNode(startNode);
      }
docs: Adapting the structure with a rolling hash for all ancestors only with
  remove.
  
  @throws TTIOException
  if anything weird happened