]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Update piece completion after setting v2 hash
authorMatt Joiner <anacrolix@gmail.com>
Wed, 20 Mar 2024 03:03:33 +0000 (14:03 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 20 Mar 2024 03:03:33 +0000 (14:03 +1100)
piece.go

index 6158e89ae4dc0a79a3b8fbdc89331ebd9a72f03a..4eec6f28ebca4aa7516a64dadd15c2214518ee01 100644 (file)
--- a/piece.go
+++ b/piece.go
@@ -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)
        }
 }