private static Known sufficientFor()

in accord-core/src/main/java/accord/messages/CheckStatus.java [304:347]


        private static Known sufficientFor(Unseekables<?, ?> unseekables, SaveStatus maxStatus, PartialTxn partialTxn, PartialDeps committedDeps, Writes writes, Result result)
        {
            Status.Definition definition = maxStatus.known.definition;
            switch (definition)
            {
                default: throw new AssertionError();
                case DefinitionKnown:
                    if (partialTxn != null && partialTxn.covers(unseekables))
                        break;
                    definition = Definition.DefinitionUnknown;
                case DefinitionUnknown:
                case NoOp:
            }

            KnownExecuteAt executeAt = maxStatus.known.executeAt;
            KnownDeps deps = maxStatus.known.deps;
            switch (deps)
            {
                default: throw new AssertionError();
                case DepsKnown:
                    if (committedDeps != null && committedDeps.covers(unseekables))
                        break;
                    deps = KnownDeps.DepsUnknown;
                case NoDeps:
                case DepsProposed:
                case DepsUnknown:
            }

            Status.Outcome outcome = maxStatus.known.outcome;
            switch (outcome)
            {
                default: throw new AssertionError();
                case OutcomeApplied:
                case OutcomeKnown:
                    if (writes != null && result != null)
                        break;

                    outcome = Outcome.OutcomeUnknown;
                case InvalidationApplied:
                case OutcomeUnknown:
            }

            return new Known(definition, executeAt, deps, outcome);
        }