From: Matt Joiner Date: Thu, 28 Dec 2017 12:59:30 +0000 (+1100) Subject: When queuing a piece for hashing after receiving a chunk, clear all the dirty chunks X-Git-Tag: v1.0.0~311 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=898db894e076940613c3243926fda63b708267ef;p=btrtrc.git When queuing a piece for hashing after receiving a chunk, clear all the dirty chunks This should fix a bug triggered by storage inconsistencies. --- diff --git a/connection.go b/connection.go index 7a9b5482..b8756215 100644 --- a/connection.go +++ b/connection.go @@ -1080,6 +1080,7 @@ func (c *connection) receiveChunk(msg *pp.Message) { // the piece is still wanted, because if it is queued, it won't be wanted. if t.pieceAllDirty(index) { t.queuePieceCheck(int(req.Index)) + t.pendAllChunkSpecs(index) } if c.peerTouchedPieces == nil {