Skip to content

Commit

Permalink
use equals
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangchiqing committed Jun 8, 2024
1 parent 7bbceca commit 4606afc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/util/cmd/find-trie-root/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 4606afc

Please sign in to comment.