MCPcopy
hub / github.com/syncthing/syncthing / checkIndexConsistency

Function checkIndexConsistency

lib/protocol/protocol.go:612–619  ·  view source on GitHub ↗

checkIndexConsistency verifies a number of invariants on FileInfos received in index messages.

(fs []FileInfo)

Source from the content-addressed store, hash-verified

610// checkIndexConsistency verifies a number of invariants on FileInfos received in
611// index messages.
612func checkIndexConsistency(fs []FileInfo) error {
613 for _, f := range fs {
614 if err := checkFileInfoConsistency(f); err != nil {
615 return fmt.Errorf("%q: %w", f.Name, err)
616 }
617 }
618 return nil
619}
620
621// checkFileInfoConsistency verifies a number of invariants on the given FileInfo
622func checkFileInfoConsistency(f FileInfo) error {

Callers 1

dispatcherLoopMethod · 0.85

Calls 1

checkFileInfoConsistencyFunction · 0.85

Tested by

no test coverage detected