mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
Don't write hashes for empty ranges
This commit is contained in:
parent
a24e91aecd
commit
51f44b8032
1 changed files with 3 additions and 1 deletions
|
@ -216,6 +216,8 @@ func (h *hashRanges) calcElementsHash(from, to uint64) (hash []byte, els int) {
|
||||||
hasher.WriteString(elem.Head)
|
hasher.WriteString(elem.Head)
|
||||||
els++
|
els++
|
||||||
}
|
}
|
||||||
hash = hasher.Sum(nil)
|
if els != 0 {
|
||||||
|
hash = hasher.Sum(nil)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue