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

Function uniqueStateBlockNIDs

roomserver/state/state.go:1285–1287  ·  view source on GitHub ↗
(nids []types.StateBlockNID)

Source from the content-addressed store, hash-verified

1283func (s stateBlockNIDSorter) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
1284
1285func uniqueStateBlockNIDs(nids []types.StateBlockNID) []types.StateBlockNID {
1286 return nids[:util.SortAndUnique(stateBlockNIDSorter(nids))]
1287}
1288
1289// Map from event type, state key tuple to numeric event ID.
1290// Implemented using binary search on a sorted array.

Callers 1

Calls 1

stateBlockNIDSorterTypeAlias · 0.85

Tested by

no test coverage detected