Remove unused function and captures (#822)

This commit is contained in:
cryptocode 2018-04-23 14:14:32 +02:00 committed by Lee Bousfield
commit 06d0c0d000
3 changed files with 2 additions and 19 deletions

View file

@ -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 ();
});
@ -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 ();
});

View file

@ -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)
{

View file

@ -345,7 +345,6 @@ public:
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);