Struct near_runtime::Runtime [−][src]
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]
&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>
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]
&self,
records: &[Record],
config: &RuntimeConfig
) -> HashMap<AccountId, u64>
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]
&self,
tries: ShardTries,
shard_id: ShardId,
validators: &[(AccountId, PublicKey, Balance)],
records: &[Record],
config: &RuntimeConfig
) -> (StoreUpdate, StateRoot)
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,