diff options
| author | rfree2monero <rfreemonero@op.pl> | 2015-02-12 20:59:39 +0100 |
|---|---|---|
| committer | rfree2monero <rfreemonero@op.pl> | 2015-02-20 22:13:00 +0100 |
| commit | 5ce4256e3d6ff2e1595750e3875865089e20a03b (patch) | |
| tree | 6e26a3ac3285cb3c86c24caa7fa51033d2794085 /src/cryptonote_core/cryptonote_core.cpp | |
| parent | eabb519605cab00dbaa5a1868d229f09c74570a6 (diff) | |
| download | monzero-core-5ce4256e3d6ff2e1595750e3875865089e20a03b.tar.gz monzero-core-5ce4256e3d6ff2e1595750e3875865089e20a03b.tar.xz monzero-core-5ce4256e3d6ff2e1595750e3875865089e20a03b.zip | |
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
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index b8b5dc008..c8daa3510 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -187,12 +187,35 @@ namespace cryptonote //----------------------------------------------------------------------------------------------- bool core::deinit() { - m_miner.stop(); - m_mempool.deinit(); - m_blockchain_storage.deinit(); + m_miner.stop(); + m_mempool.deinit(); + if (!m_fast_exit) + { + m_blockchain_storage.deinit(); + } return true; } //----------------------------------------------------------------------------------------------- + void core::set_fast_exit() + { + m_fast_exit = true; + } + //----------------------------------------------------------------------------------------------- + bool core::get_fast_exit() + { + return m_fast_exit; + } + //----------------------------------------------------------------------------------------------- + void core::no_check_blocks() + { + m_check_blocks = false; + } + //----------------------------------------------------------------------------------------------- + bool core::get_check_blocks() + { + return m_check_blocks; + } + //----------------------------------------------------------------------------------------------- bool core::handle_incoming_tx(const blobdata& tx_blob, tx_verification_context& tvc, bool keeped_by_block) { tvc = boost::value_initialized<tx_verification_context>(); @@ -595,4 +618,6 @@ namespace cryptonote { raise(SIGTERM); } + + std::atomic<bool> core::m_fast_exit(false); } |
