Kagome
Polkadot Runtime Engine in C++17
unsubscribe_new_heads.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CHAIN_UNSUBSCRIBE_NEW_HEADS_HPP
7 #define KAGOME_CHAIN_UNSUBSCRIBE_NEW_HEADS_HPP
8 
10 
12 
13  struct UnsubscribeNewHeads final : details::RequestType<void, uint32_t> {
14  explicit UnsubscribeNewHeads(std::shared_ptr<ChainApi> &api) : api_(api) {
15  BOOST_ASSERT(api_);
16  }
17 
18  outcome::result<Return> execute() override {
19  return api_->unsubscribeNewHeads(getParam<0>());
20  }
21 
22  private:
23  std::shared_ptr<ChainApi> api_;
24  };
25 
26 } // namespace kagome::api::chain::request
27 
28 #endif // KAGOME_CHAIN_UNSUBSCRIBE_NEW_HEADS_HPP
UnsubscribeNewHeads(std::shared_ptr< ChainApi > &api)