Skip to content

Commit

Permalink
Update piece completion after setting v2 hash
Browse files Browse the repository at this point in the history
  • Loading branch information
anacrolix committed Mar 20, 2024
1 parent 96b8be3 commit db6eb1e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions piece.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ func (p *Piece) setV2Hash(v2h [32]byte) {
// See Torrent.onSetInfo. We want to trigger an initial check if appropriate, if we didn't yet
// have a piece hash (can occur with v2 when we don't start with piece layers).
if !p.hashV2.Set(v2h).Ok && p.hash == nil {
p.t.updatePieceCompletion(p.index)
p.t.queueInitialPieceCheck(p.index)
}
}
Expand Down

0 comments on commit db6eb1e

Please sign in to comment.