From 18e5b0a650e0b2a42e2fe671711cf55e88b05fd1 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 19 Apr 2025 18:16:59 +0200 Subject: [PATCH] Simplify equalHashes Now that all hashes that we deal with are stored in the same pool, we can simply compare their addresses. --- pkg/gui/presentation/graph/graph.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/gui/presentation/graph/graph.go b/pkg/gui/presentation/graph/graph.go index 80f6188db..5c5240fdd 100644 --- a/pkg/gui/presentation/graph/graph.go +++ b/pkg/gui/presentation/graph/graph.go @@ -380,7 +380,6 @@ func equalHashes(a, b *string) bool { return false } - length := min(len(*a), len(*b)) - // parent hashes are only stored up to 20 characters for some reason so we'll truncate to that for comparison - return (*a)[:length] == (*b)[:length] + // We know that all hashes are stored in the pool, so we can compare their addresses + return a == b }