Kagome
Polkadot Runtime Engine in C++17
runtime_properties_cache.hpp
Go to the documentation of this file.
1 
10 #ifndef KAGOME_RUNTIME_RUNTIMEPROPERTIESCACHE
11 #define KAGOME_RUNTIME_RUNTIMEPROPERTIESCACHE
12 
13 #include "common/blob.hpp"
14 #include "outcome/outcome.hpp"
16 #include "primitives/version.hpp"
17 
18 namespace kagome::runtime {
19 
26  public:
27  virtual ~RuntimePropertiesCache() = default;
28 
29  virtual outcome::result<primitives::Version> getVersion(
30  const common::Hash256 &hash,
31  std::function<outcome::result<primitives::Version>()> obtainer) = 0;
32 
33  virtual outcome::result<primitives::OpaqueMetadata> getMetadata(
34  const common::Hash256 &hash,
35  std::function<outcome::result<primitives::OpaqueMetadata>()>
36  obtainer) = 0;
37  };
38 
39 } // namespace kagome::runtime
40 
41 #endif // KAGOME_RUNTIME_RUNTIMEPROPERTIESCACHE
virtual outcome::result< primitives::Version > getVersion(const common::Hash256 &hash, std::function< outcome::result< primitives::Version >()> obtainer)=0
virtual outcome::result< primitives::OpaqueMetadata > getMetadata(const common::Hash256 &hash, std::function< outcome::result< primitives::OpaqueMetadata >()> obtainer)=0