Add an RPC call and daemon command to get info on hard fork voting

This commit is contained in:
moneromooo-monero
2015-09-19 16:34:29 +01:00
parent d06713199e
commit e546f3724a
13 changed files with 169 additions and 5 deletions

View File

@@ -72,7 +72,7 @@ DISABLE_VS_WARNINGS(4267)
//------------------------------------------------------------------
Blockchain::Blockchain(tx_memory_pool& tx_pool) :
m_db(), m_tx_pool(tx_pool), m_timestamps_and_difficulties_height(0), m_current_block_cumul_sz_limit(0), m_is_in_checkpoint_zone(false),
m_is_blockchain_storing(false), m_enforce_dns_checkpoints(false), m_max_prepare_blocks_threads(4), m_db_blocks_per_sync(1), m_db_sync_mode(db_async), m_fast_sync(true)
m_is_blockchain_storing(false), m_enforce_dns_checkpoints(false), m_hardfork(), m_max_prepare_blocks_threads(4), m_db_blocks_per_sync(1), m_db_sync_mode(db_async), m_fast_sync(true)
{
LOG_PRINT_L3("Blockchain::" << __func__);
}
@@ -3082,3 +3082,8 @@ HardFork::State Blockchain::get_hard_fork_state() const
{
return m_hardfork.get_state();
}
bool Blockchain::get_hard_fork_voting_info(uint8_t version, uint32_t &window, uint32_t &votes, uint32_t &threshold, uint8_t &voting) const
{
return m_hardfork.get_voting_info(version, window, votes, threshold, voting);
}