6 #ifndef KAGOME_OFFCHAIN_OFFCHAINLOCALSTORAGEIMPL 7 #define KAGOME_OFFCHAIN_OFFCHAINLOCALSTORAGEIMPL 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_OFFCHAINLOCALSTORAGEIMPL Class represents arbitrary (including empty) byte buffer.
std::shared_ptr< storage::BufferStorage > storage_
OffchainLocalStorageImpl(std::shared_ptr< storage::BufferStorage > storage)
std::shared_ptr< soralog::Logger > Logger
outcome::result< void > clear(const common::BufferView &key) override
Remove a value from the local storage.
It is revertible and fork-aware. It means that any value set by the offchain worker triggered at a ce...
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. ...