sgns::runtime::TrieStorageProviderImpl¶
#include <trie_storage_provider_impl.hpp>
Inherits from sgns::runtime::TrieStorageProvider
Public Functions¶
| Name | |
|---|---|
| TrieStorageProviderImpl(std::shared_ptr< storage::trie::TrieStorage > trie_storage) | |
| ~TrieStorageProviderImpl() override =default | |
| virtual outcome::result< void > | setToEphemeral() override |
| virtual outcome::result< void > | setToEphemeralAt(const base::Hash256 & state_root) override |
| virtual outcome::result< void > | setToPersistent() override |
| virtual outcome::result< void > | setToPersistentAt(const base::Hash256 & state_root) override |
| virtual std::shared_ptr< Batch > | getCurrentBatch() const override |
| virtual boost::optional< std::shared_ptr< PersistentBatch > > | tryGetPersistentBatch() const override |
| virtual bool | isCurrentlyPersistent() const override |
| virtual outcome::result< base::Buffer > | forceCommit() override |
Additional inherited members¶
Public Types inherited from sgns::runtime::TrieStorageProvider
| Name | |
|---|---|
| using storage::trie::TrieBatch | Batch |
| using storage::trie::PersistentTrieBatch | PersistentBatch |
Public Functions inherited from sgns::runtime::TrieStorageProvider
| Name | |
|---|---|
| virtual | ~TrieStorageProvider() =default |
Public Functions Documentation¶
function TrieStorageProviderImpl¶
function ~TrieStorageProviderImpl¶
function setToEphemeral¶
Reimplements: sgns::runtime::TrieStorageProvider::setToEphemeral
Sets the current batch to a new ephemeral batch
function setToEphemeralAt¶
Reimplements: sgns::runtime::TrieStorageProvider::setToEphemeralAt
function setToPersistent¶
Reimplements: sgns::runtime::TrieStorageProvider::setToPersistent
Sets the current batch to the persistent batch (a persistent batch is unique as it accumulates changes for commit)
function setToPersistentAt¶
Warning: this will reset storage state to th specified root and discard all changes accumulated in the current persistent batch
Reimplements: sgns::runtime::TrieStorageProvider::setToPersistentAt
Sets the current batch to a new persistent batch at specified storage state
function getCurrentBatch¶
See: setToEphemeral, setToPersistent), null otherwise
Return: current batch, if any was set (
Reimplements: sgns::runtime::TrieStorageProvider::getCurrentBatch
function tryGetPersistentBatch¶
virtual boost::optional< std::shared_ptr< PersistentBatch > > tryGetPersistentBatch() const override
Return: current persistent batch, if the current batch is persistent, none otherwise
Reimplements: sgns::runtime::TrieStorageProvider::tryGetPersistentBatch
function isCurrentlyPersistent¶
Return: true, if the current batch is persistent, false otherwise
Reimplements: sgns::runtime::TrieStorageProvider::isCurrentlyPersistent
function forceCommit¶
Reimplements: sgns::runtime::TrieStorageProvider::forceCommit
Commits persistent changes even if the current batch is not persistent
Updated on 2026-03-04 at 13:10:43 -0800