Kagome
Polkadot Runtime Engine in C++17
|
#include <trie_storage_provider.hpp>
Public Types | |
using | Batch = storage::trie::TrieBatch |
using | PersistentBatch = storage::trie::PersistentTrieBatch |
Public Member Functions | |
virtual | ~TrieStorageProvider ()=default |
virtual outcome::result< void > | setToEphemeralAt (const common::Hash256 &state_root)=0 |
virtual outcome::result< void > | setToPersistentAt (const common::Hash256 &state_root)=0 |
virtual std::shared_ptr< Batch > | getCurrentBatch () const =0 |
virtual std::optional< std::shared_ptr< PersistentBatch > > | tryGetPersistentBatch () const =0 |
virtual bool | isCurrentlyPersistent () const =0 |
virtual outcome::result< std::shared_ptr< PersistentBatch > > | getChildBatchAt (const common::Buffer &root_path)=0 |
Get (or create new) Child Batch with given root hash. More... | |
virtual void | clearChildBatches () noexcept=0 |
virtual outcome::result< storage::trie::RootHash > | forceCommit ()=0 |
virtual outcome::result< void > | startTransaction ()=0 |
Start nested transaction. More... | |
virtual outcome::result< void > | rollbackTransaction ()=0 |
Rollback and finish last started transaction. More... | |
virtual outcome::result< void > | commitTransaction ()=0 |
Commit and finish last started transaction. More... | |
Provides access to the trie storage for runtime API As some calls need an access to a temporary storage (called 'ephemeral') and some introduce changes that need to persist, TrieStorageProvider maintains a 'current batch', which can be either persistent or ephemeral, and provides it for runtime calls
Definition at line 26 of file trie_storage_provider.hpp.
Definition at line 28 of file trie_storage_provider.hpp.
Definition at line 29 of file trie_storage_provider.hpp.
|
virtualdefault |
|
pure virtualnoexcept |
Clear internal map of child storages batches
Implemented in kagome::runtime::TrieStorageProviderImpl.
|
pure virtual |
Commit and finish last started transaction.
Implemented in kagome::runtime::TrieStorageProviderImpl.
|
pure virtual |
Commits persistent changes even if the current batch is not persistent
Implemented in kagome::runtime::TrieStorageProviderImpl.
|
pure virtual |
Get (or create new) Child Batch with given root hash.
root | root hash value of a new (or cached) batch |
Implemented in kagome::runtime::TrieStorageProviderImpl.
|
pure virtual |
Implemented in kagome::runtime::TrieStorageProviderImpl.
|
pure virtual |
Implemented in kagome::runtime::TrieStorageProviderImpl.
|
pure virtual |
Rollback and finish last started transaction.
Implemented in kagome::runtime::TrieStorageProviderImpl.
|
pure virtual |
Sets the current batch to a new ephemeral batch
Implemented in kagome::runtime::TrieStorageProviderImpl.
|
pure virtual |
Sets the current batch to a new persistent batch at specified storage state
Implemented in kagome::runtime::TrieStorageProviderImpl.
|
pure virtual |
Start nested transaction.
Implemented in kagome::runtime::TrieStorageProviderImpl.
|
pure virtual |
Implemented in kagome::runtime::TrieStorageProviderImpl.