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: boolWhether 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
impl Clone for WalletPeakResult
Source§fn clone(&self) -> WalletPeakResult
fn clone(&self) -> WalletPeakResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more