MCPcopy Create free account
hub / github.com/akash-network/node / NewPartialOrdering

Function NewPartialOrdering

util/partialord/partialord.go:19–28  ·  view source on GitHub ↗

NewPartialOrdering creates a new partial ordering over the set of provided elements.

(elements []string)

Source from the content-addressed store, hash-verified

17
18// NewPartialOrdering creates a new partial ordering over the set of provided elements.
19func NewPartialOrdering(elements []string) PartialOrdering {
20 elementsCopy := make([]string, len(elements))
21 copy(elementsCopy, elements)
22 sort.Strings(elementsCopy)
23 return PartialOrdering{
24 dag: dag.NewDAG(elementsCopy),
25 firstSealed: false,
26 lastSealed: false,
27 }
28}
29
30func handleDAGErr(err error) {
31 // all dag errors are logic errors that the intended users of this package should not make.

Callers 5

orderBeginBlockersFunction · 0.92
orderEndBlockersFunction · 0.92
TestAPIFunction · 0.92
TestNonStandardAPIOrderFunction · 0.92
TestSequenceFunction · 0.92

Calls 1

NewDAGFunction · 0.92

Tested by 3

TestAPIFunction · 0.74
TestNonStandardAPIOrderFunction · 0.74
TestSequenceFunction · 0.74