Skip to main content

Notice

Enum Notice 

Source
pub enum Notice {
    Accepted {
        height: u64,
        transactions: usize,
        hash: Hash256,
        pushed: bool,
    },
    Switched {
        common: u64,
        old: Tip,
        new: Tip,
        peer: PeerId,
    },
    Finalized {
        epoch: u32,
        point: u32,
        height: u64,
        peer: Option<PeerId>,
        checkpoints: usize,
        rows: Option<u64>,
        remaining: bool,
    },
    EarlierProof {
        epoch: u32,
        height: u64,
        peer: PeerId,
        partial: bool,
    },
    TooFarInFuture {
        peer: PeerId,
        height: u64,
        ahead: u64,
    },
    Behind {
        peer: PeerId,
        finalized: u64,
        tip: u64,
    },
    Produced {
        height: u64,
        hash: Hash256,
        seconds: u64,
        peers: usize,
    },
    PeerDropped {
        peer: PeerId,
        message: String,
    },
    Progress {
        message: String,
        warning: bool,
    },
}
Expand description

先端の段階で起きたこと。Display は CLI に出す文

Variants§

§

Accepted

先端にブロックを足した。pushed なら、接続してきたピアが押し付けたもの

Fields

§height: u64
§transactions: usize
§hash: Hash256
§pushed: bool
§

Switched

分かれ目 common から先を、ピアの枝に取り替えた

Fields

§common: u64
§old: Tip
§new: Tip
§peer: PeerId
§

Finalized

証明を確かめて確定を上げた。rows は刈り込んで消した差分の行(刈り込まないなら None)

Fields

§epoch: u32
§point: u32
§height: u64
§peer: Option<PeerId>

証明をくれたピア。自分で投票を数えて組んだものなら None

§checkpoints: usize
§rows: Option<u64>
§remaining: bool

刈り込みに消し残しがあり、次の確定で続きを消す

§

EarlierProof

抜けていたか、途中のポイントのままだった前のエポックの証明をしまった

Fields

§epoch: u32
§height: u64
§peer: PeerId
§partial: bool
§

TooFarInFuture

ピアの枝の時刻が今より ahead ミリ秒先なので、今は使わない

Fields

§peer: PeerId
§height: u64
§ahead: u64
§

Behind

ピアの言う確定が自分の先端より1エポック以上先にある。追いつく段階に戻る

Fields

§peer: PeerId
§finalized: u64
§tip: u64
§

Produced

ハーベストして、親から seconds 秒の高さ height のブロックを作り、先端に足した

Fields

§height: u64
§hash: Hash256
§seconds: u64
§peers: usize
§

PeerDropped

ピアを外した。message はわけを含む文

Fields

§peer: PeerId
§message: String
§

Progress

そのほかの経過。warning なら、うまくいかなかったこと

Fields

§message: String
§warning: bool

Implementations§

Source§

impl Notice

Source

pub fn is_warning(&self) -> bool

うまくいかなかったことか(CLI は標準エラーに出す)

Trait Implementations§

Source§

impl Clone for Notice

Source§

fn clone(&self) -> Notice

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 Notice

Source§

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

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

impl Display for Notice

Source§

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

Formats the value using the given formatter. Read more

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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.