Struct ckb_proposal_table::ProposalView[][src]

pub struct ProposalView { /* fields omitted */ }

A view captures point-time proposal set, representing on-chain proposed transaction pool, stored in the memory so that there is no need to fetch on hard disk, create by ProposalTable finalize method w_close and w_far define the closest and farthest on-chain distance between a transaction’s proposal and commitment.

Implementations

impl ProposalView[src]

pub fn new(
    gap: HashSet<ProposalShortId>,
    set: HashSet<ProposalShortId>
) -> ProposalView
[src]

Create new ProposalView

pub fn gap(&self) -> &HashSet<ProposalShortId>[src]

Return proposals between w_close and tip

pub fn set(&self) -> &HashSet<ProposalShortId>[src]

Return proposals between w_close and w_far

pub fn contains_proposed(&self, id: &ProposalShortId) -> bool[src]

Returns true if the proposals set between w_close and w_far contains the id.

pub fn contains_gap(&self, id: &ProposalShortId) -> bool[src]

Returns true if the proposals set between w_close and tip contains the id.

Trait Implementations

impl Clone for ProposalView[src]

impl Debug for ProposalView[src]

impl Default for ProposalView[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsAny for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,