(id RequestID)
| 20 | } |
| 21 | |
| 22 | func (c *Chunk) valid(id RequestID) bool { |
| 23 | if c.id != id { |
| 24 | return false |
| 25 | } |
| 26 | if !c.clean { |
| 27 | c.clean = c.checksum == c.calculateChecksum() |
| 28 | } |
| 29 | return c.clean |
| 30 | } |
| 31 | |
| 32 | func (c *Chunk) update(id RequestID, bytes []byte) { |
| 33 | c.id = id |
no test coverage detected