MCPcopy Create free account
hub / github.com/ethereum/node-crawler / Verify

Method Verify

pkg/common/nodes.go:121–131  ·  view source on GitHub ↗

Verify performs integrity checks on the node set.

()

Source from the content-addressed store, hash-verified

119
120// Verify performs integrity checks on the node set.
121func (ns NodeSet) Verify() error {
122 for id, n := range ns {
123 if n.N.ID() != id {
124 return fmt.Errorf("invalid node %v: ID does not match ID %v in record", id, n.N.ID())
125 }
126 if n.N.Seq() != n.Seq {
127 return fmt.Errorf("invalid node %v: 'seq' does not match seq %d from record", id, n.N.Seq())
128 }
129 }
130 return nil
131}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected