MCPcopy Create free account
hub / github.com/daodst/chat / Hash

Method Hash

roomserver/types/types.go:55–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53func (a EventNIDs) Less(i, j int) bool { return a[i] < a[j] }
54
55func (a EventNIDs) Hash() []byte {
56 j, err := json.Marshal(a)
57 if err != nil {
58 return nil
59 }
60 h := blake2b.Sum256(j)
61 return h[:]
62}
63
64// StateBlockNIDs is used to sort and dedupe state block NIDs.
65type StateBlockNIDs []StateBlockNID

Callers 3

BulkInsertStateDataMethod · 0.45
InsertStateMethod · 0.45
UpStateBlocksRefactorFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected