6 #ifndef KAGOME_OFFCHAIN_OFFCHAINPERSISTENTSTORAGEIMPL 7 #define KAGOME_OFFCHAIN_OFFCHAINPERSISTENTSTORAGEIMPL 19 std::shared_ptr<storage::BufferStorage> storage);
28 const std::optional<common::BufferView> &expected,
34 std::shared_ptr<storage::BufferStorage>
storage_;
42 #endif // KAGOME_OFFCHAIN_OFFCHAINPERSISTENTSTORAGEIMPL Class represents arbitrary (including empty) byte buffer.
OffchainPersistentStorageImpl(std::shared_ptr< storage::BufferStorage > storage)
outcome::result< void > clear(const common::BufferView &key) override
Remove a value from the local storage.
It is non-revertible and not fork-aware. It means that any value set by the offchain worker is persis...
std::shared_ptr< soralog::Logger > Logger
outcome::result< bool > compare_and_set(const common::BufferView &key, const std::optional< common::BufferView > &expected, common::Buffer value) override
Sets a new value in the local storage if the condition matches the current value. ...
std::shared_ptr< storage::BufferStorage > storage_