@Override
  public void undo(final long mark) {
    int pos = undoLog.size() - 1;
    while (pos >= 0 && undoLog.get(pos).level > mark) {
      final var entry = undoLog.get(pos);
      undoLog.remove(pos);
      if (entry.value() == null) {
        delegate.remove(entry.key());
      } else {
        delegate.put(entry.key(), entry.value());
      }
      pos--;
    }
  }
Create an UndoMap backed by another Map instance.

@param delegate The Map instance to use for backing storage
evm/src/main/java/org/hyperledger/besu/collections/undo/UndoMap.java