Skip to main content

WalletPeakResult

Struct WalletPeakResult 

Source
pub struct WalletPeakResult {
    pub peak_height: Option<u32>,
    pub synced: bool,
}
Expand description

control.wallet.peak — the node’s current chain peak height.

peak_height: null is an honest “this node tracks no height yet”, not a zero. A caller bounding a claimed confirmation MUST treat it as unknown rather than as height 0, which every block is trivially above.

§This synced is the WEAKER of the contract’s two same-named notions

synced here reports only that the replica’s initial catch-up COMPLETED. It says nothing about whether the wallet is still connected to a Chia peer, so a node that caught up yesterday and has been offline since still reports synced: true beside a height that stopped moving. WalletSyncStatusResult::phase answers the stronger question — is this being kept current? — and WalletSyncPhase::Synced therefore IMPLIES this flag while this flag does not imply that phase. The two are stated in terms of each other on purpose: they carry the same word and would otherwise drift apart silently.

§The height is the last EXISTING block

It is the height of the last block the peer view reported, never a next-block height. A consumer computing confirmation depth must floor its own arithmetic rather than assume a convention — see WalletSyncStatusResult, which records why.

Fields§

§peak_height: Option<u32>

The peak block height the node’s chain view has reached, or null when it has none.

§synced: bool

Whether the node’s own chain replica COMPLETED its catch-up. Weaker than WalletSyncPhase::Synced — see the type docs.

Trait Implementations§

Source§

impl Clone for WalletPeakResult

Source§

fn clone(&self) -> WalletPeakResult

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 Debug for WalletPeakResult

Source§

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

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

impl<'de> Deserialize<'de> for WalletPeakResult

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 WalletPeakResult

Source§

impl PartialEq for WalletPeakResult

Source§

fn eq(&self, other: &WalletPeakResult) -> 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 WalletPeakResult

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 WalletPeakResult

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.