From: Matt Joiner Date: Wed, 20 Mar 2024 03:03:33 +0000 (+1100) Subject: Update piece completion after setting v2 hash X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=db6eb1e7ee94f53ff443f5d9effaf521a517bf2a;p=btrtrc.git Update piece completion after setting v2 hash --- diff --git a/piece.go b/piece.go index 6158e89a..4eec6f28 100644 --- 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) } }