Skip to main content

merge_untracked_pending_changes_with_warmth

Function merge_untracked_pending_changes_with_warmth 

Source
pub fn merge_untracked_pending_changes_with_warmth<T: EvmTypes>(
    state: &mut State<'_>,
    child: &mut Evm<'_, T>,
    pending: PendingState,
    destructed: AddressMap<DestructedAccount>,
) -> DbResult<Vec<PersistentWrite>>
Expand description

Applies the changes of a nested transaction that child ran and detached into pending to the running transaction’s state like merge_untracked_nested_changes, and also warms the accounts and slots the nested transaction left warm, such as for executeTransaction.

Accounts the running transaction had already loaded keep their warmth, and accesses the nested transaction reverted stay cold. Like the merged changes, the warmth survives reverts of the enclosing calls.

Existing accounts the nested transaction self-destructed take the state of destructed, see destructed_accounts, and are only marked self-destructed. Without one, their balance is emptied and the rest of their state is kept.