MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / isCommitted

Method isCommitted

evidence/pool.go:276–283  ·  view source on GitHub ↗

IsCommitted returns true if we have already seen this exact evidence and it is already marked as committed.

(evidence types.Evidence)

Source from the content-addressed store, hash-verified

274
275// IsCommitted returns true if we have already seen this exact evidence and it is already marked as committed.
276func (evpool *Pool) isCommitted(evidence types.Evidence) bool {
277 key := keyCommitted(evidence)
278 ok, err := evpool.evidenceStore.Has(key)
279 if err != nil {
280 evpool.logger.Error("Unable to find committed evidence", "err", err)
281 }
282 return ok
283}
284
285// IsPending checks whether the evidence is already pending. DB errors are passed to the logger.
286func (evpool *Pool) isPending(evidence types.Evidence) bool {

Callers 3

AddEvidenceMethod · 0.95
CheckEvidenceMethod · 0.95

Calls 3

keyCommittedFunction · 0.85
HasMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected