pub enum NodeEvent {
Chain(ChainEvent),
Peer(PeerEvent),
Relay {
transactions: Arc<Vec<u8>>,
except: Option<PeerId>,
},
Partial {
incoming: Incoming,
from: Option<PeerId>,
},
PulledPartial {
peer: PeerId,
pulled: Vec<PulledPartial>,
},
Pulled {
peer: PeerId,
transactions: Vec<Vec<u8>>,
},
Votes {
messages: Vec<Vec<u8>>,
from: Option<PeerId>,
},
VotesToRelay {
messages: Vec<Vec<u8>>,
except: Option<PeerId>,
},
}Expand description
駆動役の受信箱に入れる出来事。どちらの状態機械あてか
Variants§
Chain(ChainEvent)
Peer(PeerEvent)
Relay
新しく受け付けたトランザクション(1件以上を隙間なく並べたもの。Push_Transactions の本体)。つないでいるピアの
みなに押し付ける。except は、それを渡してきたピア(送り返さない)。受け付けるのは初めて見たときだけなので、
ピアのあいだを回り続けることはない
Partial
連署を待つものが入ってきた。from は、それをくれたピア(送り返さない)
PulledPartial
ピアに頼んだ、連署を待つもの
Pulled
ピアに頼んだ未承認のトランザクション(1件ずつのバイト列)
Votes
ピアに頼んだか、押し付けられた投票のメッセージ(1つずつのバイト列)。from は頼んだピア
VotesToRelay
投票するピアみなに配る投票のメッセージ。except は、それをくれたピア(送り返さない)
Auto Trait Implementations§
impl Freeze for NodeEvent
impl RefUnwindSafe for NodeEvent
impl Send for NodeEvent
impl Sync for NodeEvent
impl Unpin for NodeEvent
impl UnsafeUnpin for NodeEvent
impl UnwindSafe for NodeEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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