33 std::vector<std::shared_ptr<PbftVote>> &&cert_votes);
77 std::deque<std::pair<PeriodData, dev::p2p::NodeID>>
queue_;
std::vector< std::shared_ptr< PbftVote > > last_block_cert_votes_
Definition: period_data_queue.hpp:82
void clear()
Clear the syncing queue and reset period to 0.
Definition: period_data_queue.cpp:29
std::deque< std::pair< PeriodData, dev::p2p::NodeID > > queue_
Definition: period_data_queue.hpp:77
bool empty() const
Return true if the queue is empty.
Definition: period_data_queue.cpp:24
PeriodDataQueue()=default
bool push(PeriodData &&period_data, const dev::p2p::NodeID &node_id, uint64_t max_pbft_size, std::vector< std::shared_ptr< PbftVote >> &&cert_votes)
Push a synced block in queue.
Definition: period_data_queue.cpp:36
std::tuple< PeriodData, std::vector< std::shared_ptr< PbftVote > >, dev::p2p::NodeID > pop()
Pop the first block from syncing queue.
Definition: period_data_queue.cpp:53
std::shared_mutex queue_access_
Definition: period_data_queue.hpp:80
uint64_t period_
Definition: period_data_queue.hpp:79
void cleanOldData(uint64_t period)
Clean any old blocks below current period.
Definition: period_data_queue.cpp:76
size_t size() const
Get the syncing queue size.
Definition: period_data_queue.cpp:14
std::shared_ptr< PbftBlock > lastPbftBlock() const
Get last pbft block from queue.
Definition: period_data_queue.cpp:68
uint64_t getPeriod() const
Get period number of the last synced block in queue.
Definition: period_data_queue.cpp:9
PeriodData class is for block execution, that includes PBFT block, certify votes, DAG blocks,...
Definition: period_data.hpp:25
PeriodDataQueue class is a syncing queue, the queue stores blocks synced from peers.
Definition: period_data_queue.hpp:20