MCPcopy
hub / github.com/syncthing/syncthing / copyDone

Method copyDone

lib/model/sharedpullerstate.go:263–271  ·  view source on GitHub ↗
(block protocol.BlockInfo)

Source from the content-addressed store, hash-verified

261}
262
263func (s *sharedPullerState) copyDone(block protocol.BlockInfo) {
264 s.mut.Lock()
265 s.copyNeeded--
266 s.updated = time.Now()
267 s.available = append(s.available, int(block.Offset/int64(s.file.BlockSize())))
268 s.availableUpdated = time.Now()
269 l.Debugln("sharedPullerState", s.folder, s.file.Name, "copyNeeded ->", s.copyNeeded)
270 s.mut.Unlock()
271}
272
273func (s *sharedPullerState) copiedFromOrigin(bytes int) {
274 s.mut.Lock()

Callers 2

TestProgressEmitterFunction · 0.95
copierRoutineMethod · 0.80

Calls 4

DebuglnMethod · 0.80
UnlockMethod · 0.80
NowMethod · 0.65
BlockSizeMethod · 0.45

Tested by 1

TestProgressEmitterFunction · 0.76