6 #ifndef KAGOME_CORE_RUNTIME_TRIE_STORAGE_PROVIDER 7 #define KAGOME_CORE_RUNTIME_TRIE_STORAGE_PROVIDER 10 #include <unordered_map> 58 virtual std::optional<std::shared_ptr<PersistentBatch>>
73 virtual outcome::result<std::shared_ptr<PersistentBatch>>
getChildBatchAt(
100 #endif // KAGOME_CORE_RUNTIME_TRIE_STORAGE_PROVIDER Class represents arbitrary (including empty) byte buffer.
virtual outcome::result< storage::trie::RootHash > forceCommit()=0
virtual std::optional< std::shared_ptr< PersistentBatch > > tryGetPersistentBatch() const =0
virtual ~TrieStorageProvider()=default
virtual outcome::result< void > commitTransaction()=0
Commit and finish last started transaction.
virtual outcome::result< void > startTransaction()=0
Start nested transaction.
virtual outcome::result< void > setToEphemeralAt(const common::Hash256 &state_root)=0
virtual bool isCurrentlyPersistent() const =0
virtual void clearChildBatches() noexcept=0
virtual outcome::result< void > setToPersistentAt(const common::Hash256 &state_root)=0
virtual std::shared_ptr< Batch > getCurrentBatch() const =0
virtual outcome::result< void > rollbackTransaction()=0
Rollback and finish last started transaction.
virtual outcome::result< std::shared_ptr< PersistentBatch > > getChildBatchAt(const common::Buffer &root_path)=0
Get (or create new) Child Batch with given root hash.