]> Sergey Matveev's repositories - btrtrc.git/commit
Count expected received chunks instead of flagging them
authorMatt Joiner <anacrolix@gmail.com>
Thu, 23 Apr 2020 02:34:43 +0000 (12:34 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 23 Apr 2020 02:34:43 +0000 (12:34 +1000)
commit12e377e3fe9142173a61f3245230b6391d00efb3
treef162880227024e214388b195a2ae93c68f2db825
parent03887dbc8016338e3b2cf952b562a3643042601f
Count expected received chunks instead of flagging them

This can be racy. In the TestReceiveChunkStorageFailure, when we have a storage write failure, we request the chunk again, but the peer has sometimes already sent it, and we return from the connection read loop with unexpected chunk after receiving it twice.
peerconn.go
peerconn_test.go