| 1250 | } |
| 1251 | |
| 1252 | void BlockChain::fill_statistics(api::cnd::GetStatistics::Response &res) const { |
| 1253 | res.checkpoints = get_latest_checkpoints(); |
| 1254 | |
| 1255 | if (!m_currency.wish_to_upgrade()) |
| 1256 | return; |
| 1257 | auto bit = m_blods.find(get_tip_bid()); |
| 1258 | if (bit == m_blods.end()) |
| 1259 | return; |
| 1260 | res.upgrade_decided_height = bit->second.upgrade_decided_height; |
| 1261 | auto count = std::count(bit->second.votes_for_upgrade_in_voting_window.begin(), |
| 1262 | bit->second.votes_for_upgrade_in_voting_window.end(), uint8_t(1)); |
| 1263 | res.upgrade_votes_in_top_block = static_cast<Height>(count); |
| 1264 | } |
| 1265 | |
| 1266 | bool BlockChain::fill_next_block_versions( |
| 1267 | const api::BlockHeader &prev_info, uint8_t *major_mm, uint8_t *major_cm) const { |
no test coverage detected