Kagome
Polkadot Runtime Engine in C++17
justification_storage_policy.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_JUSTIFICATION_STORAGE_POLICY_HPP
7 #define KAGOME_JUSTIFICATION_STORAGE_POLICY_HPP
8 
10 
11 namespace kagome::blockchain {
12  class BlockTree;
13 }
14 
15 namespace kagome::blockchain {
16 
18  public:
19  virtual ~JustificationStoragePolicy() = default;
20 
21  virtual outcome::result<bool> shouldStoreFor(
22  const primitives::BlockHeader &block) const = 0;
23  };
24 
27  public:
28  virtual outcome::result<bool> shouldStoreFor(
29  const primitives::BlockHeader &block) const override;
30 
31  virtual void initBlockchainInfo(
32  std::shared_ptr<const blockchain::BlockTree> block_tree);
33 
34  private:
35  std::shared_ptr<const blockchain::BlockTree> block_tree_;
36  };
37 
38 } // namespace kagome::blockchain
39 
40 #endif // KAGOME_JUSTIFICATION_STORAGE_POLICY_HPP
virtual outcome::result< bool > shouldStoreFor(const primitives::BlockHeader &block) const =0
std::shared_ptr< const blockchain::BlockTree > block_tree_