Kagome
Polkadot Runtime Engine in C++17
kagome::offchain::OffchainLocalStorage Class Reference

It is revertible and fork-aware. It means that any value set by the offchain worker triggered at a certain block is reverted if that block is reverted as non-canonical. The value is NOT available for the worker that is re-run at the next or any future blocks. More...

#include <offchain_local_storage.hpp>

Inheritance diagram for kagome::offchain::OffchainLocalStorage:
Collaboration diagram for kagome::offchain::OffchainLocalStorage:

Additional Inherited Members

- Public Member Functions inherited from kagome::offchain::OffchainStorage
virtual ~OffchainStorage ()=default
 
virtual outcome::result< void > set (const common::BufferView &key, common::Buffer value)=0
 Sets a value in the storage. More...
 
virtual outcome::result< void > clear (const common::BufferView &key)=0
 Remove a value from the local storage. More...
 
virtual outcome::result< bool > compare_and_set (const common::BufferView &key, const std::optional< common::BufferView > &expected, common::Buffer value)=0
 Sets a new value in the local storage if the condition matches the current value. More...
 
virtual outcome::result< common::Bufferget (const common::BufferView &key)=0
 Gets a value from the local storage. More...
 

Detailed Description

It is revertible and fork-aware. It means that any value set by the offchain worker triggered at a certain block is reverted if that block is reverted as non-canonical. The value is NOT available for the worker that is re-run at the next or any future blocks.

Local storage

Definition at line 20 of file offchain_local_storage.hpp.


The documentation for this class was generated from the following file: