Skip to content

Commit 18e5b0a

Browse files
committed
Simplify equalHashes
Now that all hashes that we deal with are stored in the same pool, we can simply compare their addresses.
1 parent 13c2136 commit 18e5b0a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/gui/presentation/graph/graph.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ func equalHashes(a, b *string) bool {
380380
return false
381381
}
382382

383-
length := min(len(*a), len(*b))
384-
// parent hashes are only stored up to 20 characters for some reason so we'll truncate to that for comparison
385-
return (*a)[:length] == (*b)[:length]
383+
// We know that all hashes are stored in the pool, so we can compare their addresses
384+
return a == b
386385
}

0 commit comments

Comments
 (0)