mirror of
https://github.com/monero-project/monero.git
synced 2025-08-09 11:52:19 -04:00
remove "using namespace std" from headers
It's nasty, and actually breaks on Solaris, where if.h fails to build due to: struct map *if_memmap;
This commit is contained in:
parent
4754390725
commit
383ff4f689
24 changed files with 47 additions and 51 deletions
|
@ -297,9 +297,9 @@ namespace cryptonote
|
|||
m_core.set_target_blockchain_height((hshd.current_height));
|
||||
int64_t diff = static_cast<int64_t>(hshd.current_height) - static_cast<int64_t>(m_core.get_current_blockchain_height());
|
||||
uint64_t abs_diff = std::abs(diff);
|
||||
uint64_t max_block_height = max(hshd.current_height,m_core.get_current_blockchain_height());
|
||||
uint64_t max_block_height = std::max(hshd.current_height,m_core.get_current_blockchain_height());
|
||||
uint64_t last_block_v1 = m_core.get_testnet() ? 624633 : 1009826;
|
||||
uint64_t diff_v2 = max_block_height > last_block_v1 ? min(abs_diff, max_block_height - last_block_v1) : 0;
|
||||
uint64_t diff_v2 = max_block_height > last_block_v1 ? std::min(abs_diff, max_block_height - last_block_v1) : 0;
|
||||
MCLOG(is_inital ? el::Level::Info : el::Level::Debug, "global", context << "Sync data returned a new top block candidate: " << m_core.get_current_blockchain_height() << " -> " << hshd.current_height
|
||||
<< " [Your node is " << abs_diff << " blocks (" << ((abs_diff - diff_v2) / (24 * 60 * 60 / DIFFICULTY_TARGET_V1)) + (diff_v2 / (24 * 60 * 60 / DIFFICULTY_TARGET_V2)) << " days) "
|
||||
<< (0 <= diff ? std::string("behind") : std::string("ahead"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue