pub enum ClaimLoopObservation {
Consulted {
observed_at: u64,
distributors_known: u64,
distributors_claimable: u64,
state: ClaimLoopState,
},
NotConsulted {
observed_at: u64,
},
}Expand description
What a node can say about its own claim loop: it read the loop’s last reported condition and has counts and a state, or it did not read the loop and has nothing to give.
A sibling of ClaimLogObservation, same vocabulary: outcome, two
arms, observed_at in both. observed_at dates the consultation —
in Consulted it is when the loop last wrote the
status this arm reports, stamped by the loop in the cycle that produced
these numbers or, before any cycle, when the loop published its initial
idle; a responder MUST NOT stamp it with the clock of the RPC handler
that read the status. Re-dating the snapshot at read time manufactures
freshness for a number nobody produced just now, and only an
observed_at that stops advancing tells a reader a stuck loop’s last
nominal is its last word rather than its current one.
In NotConsulted it is when the responder
established the loop’s status could not be read: the loop is not
constructed (claiming disabled or not started) or its status was
unreadable — not “the chain is unreachable” (that is a
ClaimLoopState) and not “no distributors” (that is a count).
Fail-closed like ClaimLogObservation: internally tagged, no
#[serde(other)], no Default, no skip_serializing_if,
deny_unknown_fields on the whole enum — a count or a verdict cannot
ride an arm that says nothing was read.
Variants§
Consulted
The claim loop’s status WAS read as of observed_at (Unix seconds).
Fields
distributors_known: u64How many reward distributors this node’s claim loop has discovered as candidates it might hold an entry in. A count of distributors, never an amount.
distributors_claimable: u64How many of those the loop judged claimable in the cycle dated by
observed_at. A count of distributors, never an amount, and a
per-cycle reading, not a lifetime total.
state: ClaimLoopStateThe loop’s condition in the cycle dated by observed_at.
NotConsulted
The claim loop’s status was NOT read as of observed_at (Unix
seconds) — the loop is not constructed or its status was unreadable.
There is deliberately no count and no state here.
Trait Implementations§
Source§impl Clone for ClaimLoopObservation
impl Clone for ClaimLoopObservation
Source§fn clone(&self) -> ClaimLoopObservation
fn clone(&self) -> ClaimLoopObservation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more