Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yzang2019 committed Jan 31, 2025
1 parent b387896 commit 9ddec69
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/hash_verification/hasher/xor_hasher.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ func (x XorHashCalculator) ComputeHashes() [][]byte {
wg.Wait()
// Now modify sub hashes to hash again with previous hash
for i := 1; i < len(allHashes); i++ {
allHashes[i] = x.HashTwo(allHashes[i-1], allHashes[i])
if len(allHashes[i-1]) > 0 && len(allHashes[i]) > 0 {
allHashes[i] = x.HashTwo(allHashes[i-1], allHashes[i])
}
}
return allHashes
}
Expand Down

0 comments on commit 9ddec69

Please sign in to comment.