#include <synchronizer.hpp>
|
virtual | ~Synchronizer ()=default |
|
virtual bool | syncByBlockInfo (const primitives::BlockInfo &block_info, const libp2p::peer::PeerId &peer_id, SyncResultHandler &&handler, bool subscribe_to_block)=0 |
|
virtual bool | syncByBlockHeader (const primitives::BlockHeader &header, const libp2p::peer::PeerId &peer_id, SyncResultHandler &&handler)=0 |
|
virtual void | syncMissingJustifications (const libp2p::peer::PeerId &peer_id, primitives::BlockInfo target_block, std::optional< uint32_t > limit, SyncResultHandler &&handler)=0 |
|
virtual void | syncState (const libp2p::peer::PeerId &peer_id, const primitives::BlockInfo &block, SyncResultHandler &&handler)=0 |
|
virtual bool | hasIncompleteRequestOfStateSync () const =0 |
|
Definition at line 18 of file synchronizer.hpp.
virtual kagome::network::Synchronizer::~Synchronizer |
( |
| ) |
|
|
virtualdefault |
virtual bool kagome::network::Synchronizer::hasIncompleteRequestOfStateSync |
( |
| ) |
const |
|
pure virtual |
Try to load and apply block with header {
- Parameters
-
block_header} | from peer { |
peer_id}. | If provided block is the best after applying, { |
handler} | be called |
- Returns
- true if sync is ran (peer is not busy)
- Note
- Is used for finish catching up if it possible, and start/continue than otherwise
Implemented in kagome::network::SynchronizerImpl.
virtual bool kagome::network::Synchronizer::syncByBlockInfo |
( |
const primitives::BlockInfo & |
block_info, |
|
|
const libp2p::peer::PeerId & |
peer_id, |
|
|
SyncResultHandler && |
handler, |
|
|
bool |
subscribe_to_block |
|
) |
| |
|
pure virtual |
Enqueues loading (and applying) blocks from peer {
- Parameters
-
peer_id} | since best common block up to provided { |
block_info}. | { |
handler} | will be called when this process is finished or failed |
- Returns
- true if sync is ran (peer is not busy)
- Note
- Is used for start/continue catching up.
Implemented in kagome::network::SynchronizerImpl.
virtual void kagome::network::Synchronizer::syncMissingJustifications |
( |
const libp2p::peer::PeerId & |
peer_id, |
|
|
primitives::BlockInfo |
target_block, |
|
|
std::optional< uint32_t > |
limit, |
|
|
SyncResultHandler && |
handler |
|
) |
| |
|
pure virtual |
Tries to request block justifications from {
- Parameters
-
peer_id} | for { |
target_block} | or a range of blocks up to { |
limit} | count. Calls { |
handler} | when operation finishes |
Implemented in kagome::network::SynchronizerImpl.
The documentation for this class was generated from the following file: