Skip to main content

restore_originals

Function restore_originals 

Source
pub fn restore_originals(
    state: &mut State<'_>,
    originals: &AddressMap<HashMap<U256, U256>>,
) -> AddressMap<HashMap<U256, U256>>
Expand description

Turns the accepted values of the slots of originals in the fresh state back into pending writes of the running transaction over their transaction-start values.

The accepted state takes the transaction-start values as well, since committing the transaction only writes slots whose values differ from their originals. Returns the replaced accepted values.