Skip to main content

PartialPool

Struct PartialPool 

Source
pub struct PartialPool { /* private fields */ }

Implementations§

Source§

impl PartialPool

Source

pub fn new( parameters: &'static NetworkParameters, config: PartialConfig, ) -> Self

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn contains(&self, hash: &Hash256) -> bool

Source

pub fn add( &mut self, bytes: &[u8], now: u64, height: u64, ) -> Result<Added, PartialRejected>

署名したアグリゲートボンデッド bytes を、今(Nemesis からのミリ秒 now)、高さ height のブロックに入れる つもりで受け付ける。連署が付いていれば、正しいものを足す。もう持っていれば、連署を足すだけ

Source

pub fn add_cosignature( &mut self, detached: &DetachedCosignature, ) -> Result<(), CosignRejected>

切り離した連署を、持っているアグリゲートに足す

Source

pub fn remove_cosignature(&mut self, hash: &Hash256, signer: &PublicKey) -> bool

連署を外す。連署できる人でなくなった(マルチシグが変わった)ものを外すとき

Source

pub fn hashes(&self) -> Vec<Hash256>

持っているもののハッシュ。期限の早い順

Source

pub fn deadline(&self, hash: &Hash256) -> Option<u64>

持っていれば、その期限(Nemesis からのミリ秒)

Source

pub fn transaction(&self, hash: &Hash256) -> Option<&[u8]>

連署を外したトランザクション

Source

pub fn cosignatures(&self, hash: &Hash256) -> Vec<Cosignature>

署名者の順の連署

Source

pub fn stitched(&self, hash: &Hash256) -> Option<Vec<u8>>

連署を署名者の順に付けたトランザクション。揃ったら、これを未承認の置き場に移す

Source

pub fn remove(&mut self, hash: &Hash256) -> bool

外す。揃って未承認の置き場に移したもの、ブロックに入ったもの、受け付けられなくなったもの。持っていたら真

Source

pub fn prune(&mut self, now: u64) -> Vec<Hash256>

期限が now より前のものを外す。外したもののハッシュ

Source

pub fn short_hash_pairs(&self) -> Vec<ShortHashPair>

持っているものの短いハッシュの組。ピアに頼むとき、持っているものを伝える

Source

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§

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> 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, 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.