Kagome
Polkadot Runtime Engine in C++17
get_finalized_head.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_API_SERVICE_CHAIN_GET_FINALIZED_HEAD_HPP
7 #define KAGOME_API_SERVICE_CHAIN_GET_FINALIZED_HEAD_HPP
8 
10 
12 
13  struct GetFinalizedHead final : details::RequestType<primitives::BlockHash> {
14  explicit GetFinalizedHead(std::shared_ptr<ChainApi> &api) : api_(api) {}
15 
16  outcome::result<primitives::BlockHash> execute() override {
17  return api_->getFinalizedHead();
18  }
19 
20  private:
21  std::shared_ptr<ChainApi> api_;
22  };
23 
24 } // namespace kagome::api::chain::request
25 
26 #endif // KAGOME_API_SERVICE_CHAIN_GET_FINALIZED_HEAD_HPP
GetFinalizedHead(std::shared_ptr< ChainApi > &api)
outcome::result< primitives::BlockHash > execute() override