Kagome
Polkadot Runtime Engine in C++17
changes_tracker.hpp
Go to the documentation of this file.
1 #ifndef KAGOME_STORAGE_CHANGES_TRIE_CHANGES_TRACKER
2 #define KAGOME_STORAGE_CHANGES_TRIE_CHANGES_TRACKER
3 
4 #include "common/buffer.hpp"
5 #include "primitives/common.hpp"
6 
8 
16  public:
17  virtual ~ChangesTracker() = default;
18 
22  virtual void onBlockExecutionStart(
23  primitives::BlockHash new_parent_hash) = 0;
24 
30  virtual void onPut(const common::BufferView &key,
31  const common::BufferView &value,
32  bool new_entry) = 0;
33 
37  virtual void onBlockAdded(const primitives::BlockHash &hash) = 0;
38 
42  virtual void onRemove(const common::BufferView &key) = 0;
43  };
44 
45 } // namespace kagome::storage::changes_trie
46 
47 #endif // KAGOME_STORAGE_CHANGES_TRIE_CHANGES_TRACKER
virtual void onPut(const common::BufferView &key, const common::BufferView &value, bool new_entry)=0
virtual void onBlockExecutionStart(primitives::BlockHash new_parent_hash)=0
virtual void onRemove(const common::BufferView &key)=0
virtual void onBlockAdded(const primitives::BlockHash &hash)=0