ReserveOutcome

sealed interface ReserveOutcome

What FairShareExecution.reserve did — a reservation, an honest "nothing to spend here", or a refusal because this peer may not author entitlement at all yet.

The three are separate types because the old ReservationId? return let a node that had never enrolled answer null, which a caller cannot tell apart from an idle lane (issue #1892). Branch on all three; a when over this type is exhaustive without an else.

Inheritors

Types

Link copied to clipboard

Nothing to earmark: this peer's spendable holdings at the leaf cannot cover the request, or the group cannot be reserved against at all — a non-leaf, a root with no inbound edge to charge, or a quarantined lineage. This is the ordinary "lane exhausted" answer, and it clears by itself once entitlement flows in.

Link copied to clipboard
data class Reserved(val id: ReservationId) : ReserveOutcome

The earmark was taken; complete or cancel id exactly once.