MCPcopy Create free account
hub / github.com/plexdrive/plexdrive / valid

Method valid

chunk/chunk.go:22–30  ·  view source on GitHub ↗
(id RequestID)

Source from the content-addressed store, hash-verified

20}
21
22func (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
32func (c *Chunk) update(id RequestID, bytes []byte) {
33 c.id = id

Callers 2

LoadMethod · 0.80
StoreMethod · 0.80

Calls 1

calculateChecksumMethod · 0.95

Tested by

no test coverage detected