Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

network/stream: fix slice append bug #1924

Merged
merged 1 commit into from
Nov 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion network/stream/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ func (r *Registry) serverHandleWantedHashes(ctx context.Context, p *Peer, msg *W
if len(msg.BitVector) == 0 {
p.logger.Debug("peer does not want any hashes in this range", "ruid", o.ruid)
for i := 0; i < l; i++ {
allHashes = append(allHashes, o.hashes[i*HashSize:(i+1)*HashSize])
allHashes[i] = o.hashes[i*HashSize : (i+1)*HashSize]
}
// set all chunks as synced
if err := provider.Set(ctx, allHashes...); err != nil {
Expand Down