Struct near_runtime::Runtime[][src]

pub struct Runtime {}

Implementations

impl Runtime[src]

pub fn new() -> Self[src]

pub fn apply(
    &self,
    trie: Trie,
    root: CryptoHash,
    validator_accounts_update: &Option<ValidatorAccountsUpdate>,
    apply_state: &ApplyState,
    incoming_receipts: &[Receipt],
    transactions: &[SignedTransaction],
    epoch_info_provider: &dyn EpochInfoProvider
) -> Result<ApplyResult, RuntimeError>
[src]

Applies new singed transactions and incoming receipts for some chunk/shard on top of given trie and the given state root. If the validator accounts update is provided, updates validators accounts. All new signed transactions should be valid and already verified by the chunk producer. If any transaction is invalid, it would return an InvalidTxError. Returns an ApplyResult that contains the new state root, trie changes, new outgoing receipts, execution outcomes for all transactions, local action receipts (generated from transactions with signer == receivers) and incoming action receipts.

pub fn compute_storage_usage<Record: Borrow<StateRecord>>(
    &self,
    records: &[Record],
    config: &RuntimeConfig
) -> HashMap<AccountId, u64>
[src]

It’s okay to use unsafe math here, because this method should only be called on the trusted state records (e.g. at launch from genesis)

pub fn apply_genesis_state<Record: Borrow<StateRecord>>(
    &self,
    tries: ShardTries,
    shard_id: ShardId,
    validators: &[(AccountId, PublicKey, Balance)],
    records: &[Record],
    config: &RuntimeConfig
) -> (StoreUpdate, StateRoot)
[src]

Balances are account, publickey, initial_balance, initial_tx_stake

Auto Trait Implementations

impl RefUnwindSafe for Runtime

impl Send for Runtime

impl Sync for Runtime

impl Unpin for Runtime

impl UnwindSafe for Runtime

Blanket Implementations

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

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> Instrument for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,