Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused function and captures #822

Merged
merged 1 commit into from
Apr 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rai/node/bootstrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ void rai::bootstrap_attempt::request_pull (std::unique_lock<std::mutex> & lock_a
auto size (pulls.size ());
// The bulk_pull_client destructor attempt to requeue_pull which can cause a deadlock if this is the last reference
// Dispatch request in an external thread in case it needs to be destroyed
node->background ([connection_l, pull, size]() {
node->background ([connection_l, pull]() {
auto client (std::make_shared<rai::bulk_pull_client> (connection_l, pull));
client->request ();
});
Expand Down Expand Up @@ -1264,7 +1264,7 @@ void rai::bootstrap_attempt::requeue_pull (rai::pull_info const & pull_a)
if (auto connection_shared = connection_frontier_request.lock ())
{
auto size (pulls.size ());
node->background ([connection_shared, pull, size]() {
node->background ([connection_shared, pull]() {
auto client (std::make_shared<rai::bulk_pull_client> (connection_shared, pull));
client->request ();
});
Expand Down
16 changes: 0 additions & 16 deletions rai/node/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,22 +139,6 @@ void rai::network::republish (rai::block_hash const & hash_a, std::shared_ptr<st
});
}

void rai::network::rebroadcast_reps (std::shared_ptr<rai::block> block_a)
{
auto hash (block_a->hash ());
rai::publish message (block_a);
std::shared_ptr<std::vector<uint8_t>> bytes (new std::vector<uint8_t>);
{
rai::vectorstream stream (*bytes);
message.serialize (stream);
}
auto representatives (node.peers.representatives (2 * node.peers.size_sqrt ()));
for (auto i : representatives)
{
republish (hash, bytes, i.endpoint);
}
}

template <typename T>
bool confirm_block (MDB_txn * transaction_a, rai::node & node_a, T & list_a, std::shared_ptr<rai::block> block_a)
{
Expand Down
1 change: 0 additions & 1 deletion rai/node/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ class network
void stop ();
void receive_action (boost::system::error_code const &, size_t);
void rpc_action (boost::system::error_code const &, size_t);
void rebroadcast_reps (std::shared_ptr<rai::block>);
void republish_vote (std::shared_ptr<rai::vote>);
void republish_block (MDB_txn *, std::shared_ptr<rai::block>);
void republish (rai::block_hash const &, std::shared_ptr<std::vector<uint8_t>>, rai::endpoint);
Expand Down