From 4606afcf4a988293866485f5589f969c1797724a Mon Sep 17 00:00:00 2001 From: "Leo Zhang (zhangchiqing)" Date: Fri, 7 Jun 2024 21:24:12 -0700 Subject: [PATCH] use equals --- cmd/util/cmd/find-trie-root/cmd.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/util/cmd/find-trie-root/cmd.go b/cmd/util/cmd/find-trie-root/cmd.go index 22be1d18fcf..f186114407b 100644 --- a/cmd/util/cmd/find-trie-root/cmd.go +++ b/cmd/util/cmd/find-trie-root/cmd.go @@ -148,7 +148,7 @@ func searchRootHashInSegments( switch operation { case wal.WALUpdate: - if rootHash == expectedHash { + if rootHash.Equals(expectedHash) { log.Info().Msgf("found expected trie root hash %x", rootHash) return reader.Segment(), reader.Offset(), nil } @@ -205,7 +205,7 @@ func copyWAL(dir, outputDir string, segment int, expectedRoot ledger.RootHash) e switch operation { case wal.WALUpdate: - if rootHash == expectedRoot { + if rootHash.Equals(expectedRoot) { log.Info().Msgf("found expected trie root hash %x, finish writing", rootHash) return nil }