pub struct PartialPool { /* private fields */ }Implementations§
Source§impl PartialPool
impl PartialPool
pub fn new( parameters: &'static NetworkParameters, config: PartialConfig, ) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn contains(&self, hash: &Hash256) -> bool
Sourcepub fn add(
&mut self,
bytes: &[u8],
now: u64,
height: u64,
) -> Result<Added, PartialRejected>
pub fn add( &mut self, bytes: &[u8], now: u64, height: u64, ) -> Result<Added, PartialRejected>
署名したアグリゲートボンデッド bytes を、今(Nemesis からのミリ秒 now)、高さ height のブロックに入れる
つもりで受け付ける。連署が付いていれば、正しいものを足す。もう持っていれば、連署を足すだけ
Sourcepub fn add_cosignature(
&mut self,
detached: &DetachedCosignature,
) -> Result<(), CosignRejected>
pub fn add_cosignature( &mut self, detached: &DetachedCosignature, ) -> Result<(), CosignRejected>
切り離した連署を、持っているアグリゲートに足す
Sourcepub fn remove_cosignature(&mut self, hash: &Hash256, signer: &PublicKey) -> bool
pub fn remove_cosignature(&mut self, hash: &Hash256, signer: &PublicKey) -> bool
連署を外す。連署できる人でなくなった(マルチシグが変わった)ものを外すとき
Sourcepub fn transaction(&self, hash: &Hash256) -> Option<&[u8]>
pub fn transaction(&self, hash: &Hash256) -> Option<&[u8]>
連署を外したトランザクション
Sourcepub fn cosignatures(&self, hash: &Hash256) -> Vec<Cosignature>
pub fn cosignatures(&self, hash: &Hash256) -> Vec<Cosignature>
署名者の順の連署
Sourcepub fn stitched(&self, hash: &Hash256) -> Option<Vec<u8>>
pub fn stitched(&self, hash: &Hash256) -> Option<Vec<u8>>
連署を署名者の順に付けたトランザクション。揃ったら、これを未承認の置き場に移す
Sourcepub fn remove(&mut self, hash: &Hash256) -> bool
pub fn remove(&mut self, hash: &Hash256) -> bool
外す。揃って未承認の置き場に移したもの、ブロックに入ったもの、受け付けられなくなったもの。持っていたら真
Sourcepub fn short_hash_pairs(&self) -> Vec<ShortHashPair>
pub fn short_hash_pairs(&self) -> Vec<ShortHashPair>
持っているものの短いハッシュの組。ピアに頼むとき、持っているものを伝える
Sourcepub fn unknown_to(
&self,
min_deadline: u64,
known: &HashMap<u32, u32>,
) -> Vec<CosignedInfo<'_>>
pub fn unknown_to( &self, min_deadline: u64, known: &HashMap<u32, u32>, ) -> Vec<CosignedInfo<'_>>
ピアが known(トランザクションの短いハッシュから、連署の短いハッシュ)を持っているときに、渡すもの。
期限が min_deadline より前のものと、連署まで同じものは渡さない。トランザクションを知っていれば、
ハッシュと連署だけを渡す。PartialConfig::max_response_bytes を超えるところで止める(catapult と同じ)
Auto Trait Implementations§
impl Freeze for PartialPool
impl RefUnwindSafe for PartialPool
impl Send for PartialPool
impl Sync for PartialPool
impl Unpin for PartialPool
impl UnsafeUnpin for PartialPool
impl UnwindSafe for PartialPool
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
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