[][src]Struct ckb_dao::DaoCalculator

pub struct DaoCalculator<'a, CS, DL> {
    pub consensus: &'a Consensus,
    pub store: &'a CS,
    pub data_loader: DL,
}

Fields

consensus: &'a Consensusstore: &'a CSdata_loader: DL

Implementations

impl<'a, CS: ChainStore<'a>> DaoCalculator<'a, CS, DataLoaderWrapper<'a, CS>>[src]

pub fn new(consensus: &'a Consensus, store: &'a CS) -> Self[src]

pub fn primary_block_reward(
    &self,
    target: &HeaderView
) -> Result<Capacity, Error>
[src]

pub fn secondary_block_reward(
    &self,
    target: &HeaderView
) -> Result<Capacity, Error>
[src]

pub fn base_block_reward(&self, parent: &HeaderView) -> Result<Capacity, Error>[src]

pub fn dao_field(
    &self,
    rtxs: &[ResolvedTransaction],
    parent: &HeaderView
) -> Result<Byte32, Error>
[src]

pub fn maximum_withdraw(
    &self,
    out_point: &OutPoint,
    withdrawing_header_hash: &Byte32
) -> Result<Capacity, Error>
[src]

pub fn transaction_fee(
    &self,
    rtx: &ResolvedTransaction
) -> Result<Capacity, Error>
[src]

Auto Trait Implementations

impl<'a, CS, DL> RefUnwindSafe for DaoCalculator<'a, CS, DL> where
    CS: RefUnwindSafe,
    DL: RefUnwindSafe

impl<'a, CS, DL> Send for DaoCalculator<'a, CS, DL> where
    CS: Sync,
    DL: Send

impl<'a, CS, DL> Sync for DaoCalculator<'a, CS, DL> where
    CS: Sync,
    DL: Sync

impl<'a, CS, DL> Unpin for DaoCalculator<'a, CS, DL> where
    DL: Unpin

impl<'a, CS, DL> UnwindSafe for DaoCalculator<'a, CS, DL> where
    CS: RefUnwindSafe,
    DL: UnwindSafe

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> Erased for T

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

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