aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-02-02 18:16:38 +0200
committerRiccardo Spagni <ric@spagni.net>2017-02-02 18:16:39 +0200
commitf9e60dcd551b9f5b4a86a730d0abfc97a6767519 (patch)
treee1613849aa7a66b11876a03b081c4cc4f6450ca8 /src/cryptonote_protocol
parentMerge pull request #1614 (diff)
parentRemove boost/foreach.cpp includes (diff)
downloadmonero-f9e60dcd551b9f5b4a86a730d0abfc97a6767519.tar.xz
Merge pull request #1617
0644eed7 Remove boost/foreach.cpp includes (Miguel Herranz) 36dd3e23 Replace BOOST_REVERSE_FOREACH with ranged for (Miguel Herranz) 629e3101 Replace BOOST_FOREACH with C++11 ranged for (Miguel Herranz)
Diffstat (limited to 'src/cryptonote_protocol')
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler-base.cpp1
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.inl14
2 files changed, 7 insertions, 8 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler-base.cpp b/src/cryptonote_protocol/cryptonote_protocol_handler-base.cpp
index 56b82ed15..09c202e79 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler-base.cpp
+++ b/src/cryptonote_protocol/cryptonote_protocol_handler-base.cpp
@@ -52,7 +52,6 @@
#include "../../contrib/epee/include/net/net_utils_base.h"
#include "../../contrib/epee/include/misc_log_ex.h"
#include <boost/lambda/bind.hpp>
-#include <boost/foreach.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/uuid/random_generator.hpp>
#include <boost/chrono.hpp>
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
index 73e4fa72f..1309ff742 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl
+++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -411,7 +411,7 @@ namespace cryptonote
transaction tx;
crypto::hash tx_hash;
- BOOST_FOREACH(auto& tx_blob, arg.b.txs)
+ for(auto& tx_blob: arg.b.txs)
{
if(parse_and_validate_tx_from_blob(tx_blob, tx))
{
@@ -527,7 +527,7 @@ namespace cryptonote
}
size_t tx_idx = 0;
- BOOST_FOREACH(auto& tx_hash, new_block.tx_hashes)
+ for(auto& tx_hash: new_block.tx_hashes)
{
if(m_core.get_pool_transaction(tx_hash, tx))
{
@@ -638,7 +638,7 @@ namespace cryptonote
fluffy_response.current_blockchain_height = m_core.get_current_blockchain_height();
fluffy_response.hop = arg.hop;
size_t local_txs_count = local_txs.size();
- BOOST_FOREACH(auto& tx_idx, arg.missing_tx_indices)
+ for(auto& tx_idx: arg.missing_tx_indices)
{
if(tx_idx < local_txs_count)
{
@@ -790,7 +790,7 @@ namespace cryptonote
context.m_remote_blockchain_height = arg.current_blockchain_height;
size_t count = 0;
- BOOST_FOREACH(const block_complete_entry& block_entry, arg.blocks)
+ for(const block_complete_entry& block_entry: arg.blocks)
{
if (m_stopping)
{
@@ -859,7 +859,7 @@ namespace cryptonote
uint64_t previous_height = m_core.get_current_blockchain_height();
m_core.prepare_handle_incoming_blocks(arg.blocks);
- BOOST_FOREACH(const block_complete_entry& block_entry, arg.blocks)
+ for(const block_complete_entry& block_entry: arg.blocks)
{
if (m_stopping)
{
@@ -869,7 +869,7 @@ namespace cryptonote
// process transactions
TIME_MEASURE_START(transactions_process_time);
- BOOST_FOREACH(auto& tx_blob, block_entry.txs)
+ for(auto& tx_blob: block_entry.txs)
{
tx_verification_context tvc = AUTO_VAL_INIT(tvc);
m_core.handle_incoming_tx(tx_blob, tvc, true, true, false);
@@ -1077,7 +1077,7 @@ namespace cryptonote
m_p2p->drop_connection(context);
}
- BOOST_FOREACH(auto& bl_id, arg.m_block_ids)
+ for(auto& bl_id: arg.m_block_ids)
{
if(!m_core.have_block(bl_id))
context.m_needed_objects.push_back(bl_id);