Kagome
Polkadot Runtime Engine in C++17
|
#include <state_protocol_observer_impl.hpp>
Public Types | |
enum | Error { Error::INVALID_CHILD_ROOTHASH = 1, Error::NOTFOUND_CHILD_ROOTHASH } |
Public Member Functions | |
StateProtocolObserverImpl (std::shared_ptr< blockchain::BlockHeaderRepository > blocks_headers, std::shared_ptr< storage::trie::TrieStorage > storage) | |
~StateProtocolObserverImpl () override=default | |
outcome::result< StateResponse > | onStateRequest (const StateRequest &request) const override |
Public Member Functions inherited from kagome::network::StateProtocolObserver | |
virtual | ~StateProtocolObserver ()=default |
Private Member Functions | |
outcome::result< std::pair< KeyValueStateEntry, size_t > > | getEntry (const storage::trie::RootHash &hash, const common::Buffer &key, size_t limit) const |
Private Attributes | |
std::shared_ptr< blockchain::BlockHeaderRepository > | blocks_headers_ |
std::shared_ptr< storage::trie::TrieStorage > | storage_ |
log::Logger | log_ |
Definition at line 27 of file state_protocol_observer_impl.hpp.
Enumerator | |
---|---|
INVALID_CHILD_ROOTHASH | |
NOTFOUND_CHILD_ROOTHASH |
Definition at line 31 of file state_protocol_observer_impl.hpp.
kagome::network::StateProtocolObserverImpl::StateProtocolObserverImpl | ( | std::shared_ptr< blockchain::BlockHeaderRepository > | blocks_headers, |
std::shared_ptr< storage::trie::TrieStorage > | storage | ||
) |
Definition at line 35 of file state_protocol_observer_impl.cpp.
|
overridedefault |
|
private |
Definition at line 46 of file state_protocol_observer_impl.cpp.
|
overridevirtual |
Process a state request
request | to be processed |
Implements kagome::network::StateProtocolObserver.
Definition at line 81 of file state_protocol_observer_impl.cpp.
|
private |
Definition at line 48 of file state_protocol_observer_impl.hpp.
|
private |
Definition at line 50 of file state_protocol_observer_impl.hpp.
|
private |
Definition at line 49 of file state_protocol_observer_impl.hpp.