Skip to content

Commit

Permalink
fix merge step 2
Browse files Browse the repository at this point in the history
Signed-off-by: Karim Taam <[email protected]>
  • Loading branch information
matkt committed Jan 29, 2024
1 parent 90e1852 commit 1230db0
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,23 @@ public boolean equals(final Object o) {
return false;
}
StorageSlotKey that = (StorageSlotKey) o;
return Objects.equals(getSlotHash(), that.getSlotHash());
return Objects.equals(slotHash, that.slotHash);
}

@Override
public int hashCode() {
return Objects.hash(getSlotHash().hashCode());
return Objects.hash(slotHash.hashCode());
}

@Override
public String toString() {
return String.format(
"StorageSlotKey{slotHash=%s, slotKey=%s}",
getSlotHash(), slotKey.map(UInt256::toString).orElse("null"));
slotHash, slotKey.map(UInt256::toString).orElse("null"));
}

@Override
public int compareTo(@NotNull final StorageSlotKey other) {
if (getSlotKey().isPresent() && other.getSlotKey().isPresent()) {
return getSlotKey().map(key -> key.compareTo(other.slotKey.get())).get();
}
return this.getSlotHash().compareTo(other.getSlotHash());
return this.slotHash.compareTo(other.getSlotHash());
}
}

0 comments on commit 1230db0

Please sign in to comment.