2014 network limit 1.1 +utils +toc -doc -drmonero
Update of the PR with network limits works very well for all speeds (but remember that low download speed can stop upload because we then slow down downloading of blockchain requests too) more debug options fixed pedantic warnings in our code should work again on Mac OS X and FreeBSD fixed warning about size_t tested on Debian, Ubuntu, Windows(testing now) TCP options and ToS (QoS) flag FIXED peer number limit FIXED some spikes in ingress/download FIXED problems when other up and down limit
This commit is contained in:
@@ -178,6 +178,22 @@ bool blockchain_storage::store_genesis_block(bool testnet) {
|
||||
return true;
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
void blockchain_storage::logger_handle(long int ms)
|
||||
{
|
||||
std::ofstream log_file;
|
||||
log_file.open("log/dr-monero/blockchain_log.data", std::ofstream::out | std::ofstream::app);
|
||||
log_file.precision(7);
|
||||
|
||||
using namespace boost::chrono;
|
||||
auto point = steady_clock::now();
|
||||
auto time_from_epoh = point.time_since_epoch();
|
||||
auto m_ms = duration_cast< milliseconds >( time_from_epoh ).count();
|
||||
double ms_f = m_ms;
|
||||
ms_f /= 1000.;
|
||||
|
||||
log_file << ms_f << " " << ms << std::endl;
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
bool blockchain_storage::store_blockchain()
|
||||
{
|
||||
m_is_blockchain_storing = true;
|
||||
@@ -1760,6 +1776,8 @@ bool blockchain_storage::handle_block_to_main_chain(const block& bl, const crypt
|
||||
<< "), coinbase_blob_size: " << coinbase_blob_size << ", cumulative size: " << cumulative_block_size
|
||||
<< ", " << block_processing_time << "("<< target_calculating_time << "/" << longhash_calculating_time << ")ms");
|
||||
|
||||
logger_handle(block_processing_time);
|
||||
|
||||
bvc.m_added_to_main_chain = true;
|
||||
/*if(!m_orphanes_reorganize_in_work)
|
||||
review_orphaned_blocks_with_new_block_id(id, true);*/
|
||||
|
||||
Reference in New Issue
Block a user