Skip to content

Commit

Permalink
Rebased PR 1003
Browse files Browse the repository at this point in the history
  • Loading branch information
SergiySW committed Jul 27, 2018
1 parent af65e46 commit d32ac3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions rai/node/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,9 @@ void rai::network::broadcast_confirm_req (std::shared_ptr<rai::block> block_a)
broadcast_confirm_req_base (block_a, list, 0);
}

void rai::network::broadcast_confirm_req_base (std::shared_ptr<rai::block> block_a, std::shared_ptr<std::vector<rai::peer_information>> endpoints_a, unsigned delay_a)
void rai::network::broadcast_confirm_req_base (std::shared_ptr<rai::block> block_a, std::shared_ptr<std::vector<rai::peer_information>> endpoints_a, unsigned delay_a, bool resumption)
{
if (node.config.logging.network_logging ())
if (!resumption && node.config.logging.network_logging ())
{
BOOST_LOG (node.log) << boost::str (boost::format ("Broadcasting confirm req for block %1% to %2% representatives") % block_a->hash ().to_string () % endpoints_a->size ());
}
Expand All @@ -291,7 +291,7 @@ void rai::network::broadcast_confirm_req_base (std::shared_ptr<rai::block> block
node.alarm.add (std::chrono::steady_clock::now () + std::chrono::milliseconds (delay_a), [node_w, block_a, endpoints_a, delay_a]() {
if (auto node_l = node_w.lock ())
{
node_l->network.broadcast_confirm_req_base (block_a, endpoints_a, delay_a + 50);
node_l->network.broadcast_confirm_req_base (block_a, endpoints_a, delay_a + 50, true);
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion rai/node/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ class network
void send_keepalive (rai::endpoint const &);
void send_node_id_handshake (rai::endpoint const &, boost::optional<rai::uint256_union> const & query, boost::optional<rai::uint256_union> const & respond_to);
void broadcast_confirm_req (std::shared_ptr<rai::block>);
void broadcast_confirm_req_base (std::shared_ptr<rai::block>, std::shared_ptr<std::vector<rai::peer_information>>, unsigned);
void broadcast_confirm_req_base (std::shared_ptr<rai::block>, std::shared_ptr<std::vector<rai::peer_information>>, unsigned, bool = false);
void send_confirm_req (rai::endpoint const &, std::shared_ptr<rai::block>);
void send_buffer (uint8_t const *, size_t, rai::endpoint const &, std::function<void(boost::system::error_code const &, size_t)>);
rai::endpoint endpoint ();
Expand Down

0 comments on commit d32ac3f

Please # to comment.