[][src]Struct hycon_rust::consensus::state_processor::StateProcessor

pub struct StateProcessor<BlockDBType = BlockDB, WorldStateType = WorldState> { /* fields omitted */ }

Methods

impl StateProcessor[src]

pub fn new(
    block_db: Arc<Mutex<BlockDB>>,
    worldstate: WorldState
) -> StateProcessor<BlockDB, WorldState>
[src]

pub fn generate_transition<HeaderType, TransactionType>(
    &self,
    blocks: Vec<&Block<HeaderType, TransactionType>>
) -> Result<BTreeMap<Address, Account>, Box<dyn Error>> where
    HeaderType: BlockHeader + Encode + Proto + Clone,
    TransactionType: Transaction<Address, RecoverableSignature, RecoveryId>, 
[src]

pub fn revert_tx_transition<TxType>(
    tx: &TxType,
    account_map: &mut BTreeMap<Address, Account>,
    miner: Option<&Address>
) -> Result<(), Box<dyn Error>> where
    TxType: Transaction<Address, RecoverableSignature, RecoveryId>, 
[src]

pub fn apply_transition(
    &mut self,
    transition: BTreeMap<Address, Account>,
    root: Option<&[u8]>
) -> Result<Vec<u8>, Box<dyn Error>>
[src]

Auto Trait Implementations

impl<BlockDBType, WorldStateType> Send for StateProcessor<BlockDBType, WorldStateType> where
    BlockDBType: Send,
    WorldStateType: Send

impl<BlockDBType, WorldStateType> Sync for StateProcessor<BlockDBType, WorldStateType> where
    BlockDBType: Send,
    WorldStateType: Sync

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto 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> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

impl<T> Erased for T

impl<T> Same for T

type Output = T

Should always be Self