referrerpolicy=no-referrer-when-downgrade

Type Alias sc_consensus_slots::StorageChanges

source ·
pub type StorageChanges<Block> = StorageChanges<HashingFor<Block>>;
Expand description

The changes that need to applied to the storage to create the state for a block.

See [sp_state_machine::StorageChanges] for more information.

Aliased Type§

struct StorageChanges<Block> {
    pub main_storage_changes: Vec<(Vec<u8>, Option<Vec<u8>>)>,
    pub child_storage_changes: Vec<(Vec<u8>, Vec<(Vec<u8>, Option<Vec<u8>>)>)>,
    pub offchain_storage_changes: Vec<((Vec<u8>, Vec<u8>), OffchainOverlayedChange)>,
    pub transaction: MemoryDB<<<Block as Block>::Header as Header>::Hashing, PrefixedKey<<<Block as Block>::Header as Header>::Hashing>, Vec<u8>>,
    pub transaction_storage_root: <<<Block as Block>::Header as Header>::Hashing as Hasher>::Out,
    pub transaction_index_changes: Vec<IndexOperation>,
}

Fields§

§main_storage_changes: Vec<(Vec<u8>, Option<Vec<u8>>)>

All changes to the main storage.

A value of None means that it was deleted.

§child_storage_changes: Vec<(Vec<u8>, Vec<(Vec<u8>, Option<Vec<u8>>)>)>

All changes to the child storages.

§offchain_storage_changes: Vec<((Vec<u8>, Vec<u8>), OffchainOverlayedChange)>

Offchain state changes to write to the offchain database.

§transaction: MemoryDB<<<Block as Block>::Header as Header>::Hashing, PrefixedKey<<<Block as Block>::Header as Header>::Hashing>, Vec<u8>>

A transaction for the backend that contains all changes from main_storage_changes and from child_storage_changes. offchain_storage_changes.

§transaction_storage_root: <<<Block as Block>::Header as Header>::Hashing as Hasher>::Out

The storage root after applying the transaction.

§transaction_index_changes: Vec<IndexOperation>

Changes to the transaction index,