pub enum Request {
Chain(PeerCommand),
Peer(Ask),
Transactions(Arc<Vec<u8>>),
Push {
packet_type: u32,
body: Arc<Vec<u8>>,
},
PullPartial {
min_deadline: u64,
known: Vec<ShortHashPair>,
},
PullTransactions {
min_deadline: u64,
min_fee_multiplier: u32,
known: Vec<u32>,
},
PullVotes {
min: FinalizationRound,
max: FinalizationRound,
known: Vec<u32>,
},
}Expand description
ピアのスレッドへの命令。中核からのものと、ピアの意思決定からのもの
Variants§
Chain(PeerCommand)
Peer(Ask)
Transactions(Arc<Vec<u8>>)
受け付けたトランザクションを押し付ける。返事はなく、失敗したときだけ ChainEvent::Failed を返す
Push
packet_type の本体 body を押し付ける(連署を待つものと、連署)。返事はない
PullPartial
連署を待つものを頼む。NodeEvent::PulledPartial で返す
PullTransactions
未承認のトランザクションを頼む。期限が min_deadline 以降で、手数料の倍率が min_fee_multiplier 以上のもののうち、
known(短いハッシュ)にないもの。NodeEvent::Pulled で返す
PullVotes
ラウンド min から max までの投票のメッセージのうち、known(短いハッシュ)にないものを頼む。
NodeEvent::Votes で返す
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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