6 #ifndef KAGOME_STATE_PROTOCOL_OBSERVER_IMPL 7 #define KAGOME_STATE_PROTOCOL_OBSERVER_IMPL 17 namespace blockchain {
18 class BlockHeaderRepository;
20 namespace storage::trie {
29 public std::enable_shared_from_this<StateProtocolObserverImpl> {
31 enum class Error { INVALID_CHILD_ROOTHASH = 1, NOTFOUND_CHILD_ROOTHASH };
34 std::shared_ptr<blockchain::BlockHeaderRepository> blocks_headers,
35 std::shared_ptr<storage::trie::TrieStorage> storage);
39 outcome::result<StateResponse> onStateRequest(
43 outcome::result<std::pair<KeyValueStateEntry, size_t>> getEntry(
49 std::shared_ptr<storage::trie::TrieStorage>
storage_;
56 #endif // KAGOME_STATE_PROTOCOL_OBSERVER_IMPL Class represents arbitrary (including empty) byte buffer.
OUTCOME_HPP_DECLARE_ERROR(kagome::network, StateProtocolObserverImpl::Error)
std::shared_ptr< soralog::Logger > Logger
std::shared_ptr< storage::trie::TrieStorage > storage_
std::shared_ptr< blockchain::BlockHeaderRepository > blocks_headers_