]> Sergey Matveev's repositories - btrtrc.git/commit
Replace storage.IncompletePieceToWriter with io.Writer
authorMatt Joiner <anacrolix@gmail.com>
Thu, 5 Nov 2020 23:36:49 +0000 (10:36 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Fri, 6 Nov 2020 05:23:38 +0000 (16:23 +1100)
commit7cb74b158f6aee35142ec19e91708ee803119656
tree66316b0d1f396f4e1f9e8c774f68365f972b0a03
parent81224de76217a05f7e0edb11799a348cec6b473d
Replace storage.IncompletePieceToWriter with io.Writer

It was incorrect to assume piece hashing only operates on incomplete chunk data. This actually uncovered a bug where duplicate hash checks occurred, and the redundant checks would fail due to not reading the completed data.
storage/interface.go
storage/piece_resource.go
storage/sqlite/sqlite-storage.go
storage/wrappers.go
torrent.go