Skip to main content

ClaimLoopObservation

Enum ClaimLoopObservation 

Source
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

§observed_at: u64

Unix seconds the claim loop last wrote the status this arm reports.

§distributors_known: u64

How 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: u64

How 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: ClaimLoopState

The 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.

Fields

§observed_at: u64

Unix seconds the responder established it could not read the loop’s status.

Trait Implementations§

Source§

impl Clone for ClaimLoopObservation

Source§

fn clone(&self) -> ClaimLoopObservation

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ClaimLoopObservation

Source§

impl Debug for ClaimLoopObservation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ClaimLoopObservation

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ClaimLoopObservation

Source§

impl PartialEq for ClaimLoopObservation

Source§

fn eq(&self, other: &ClaimLoopObservation) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ClaimLoopObservation

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ClaimLoopObservation

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.