forked from lthn/blockchain
now max_seed_height is always greater then or equal to current node's top block height
This commit is contained in:
parent
8fc70f4d6d
commit
3d1f4a5336
2 changed files with 3 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ namespace currency
|
|||
uint64_t get_current_tx_version() const;
|
||||
uint64_t get_top_block_height() const;
|
||||
std::string get_config_folder();
|
||||
bool get_blockchain_top(uint64_t& heeight, crypto::hash& top_id) const;
|
||||
bool get_blockchain_top(uint64_t& height, crypto::hash& top_id) const;
|
||||
bool get_blocks(uint64_t start_offset, size_t count, std::list<block>& blocks, std::list<transaction>& txs);
|
||||
bool get_blocks(uint64_t start_offset, size_t count, std::list<block>& blocks);
|
||||
template<class t_ids_container, class t_blocks_container, class t_missed_container>
|
||||
|
|
|
|||
|
|
@ -229,7 +229,8 @@ namespace currency
|
|||
template<class t_core>
|
||||
uint64_t t_currency_protocol_handler<t_core>::get_max_seen_height()
|
||||
{
|
||||
return m_max_height_seen;
|
||||
uint64_t max_seen = m_max_height_seen;
|
||||
return std::max(max_seen, m_core.get_blockchain_storage().get_top_block_height());
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------------------------
|
||||
template<class t_core>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue