From ef6da06e0406ce89d70d7a23d6e313b8ef753da1 Mon Sep 17 00:00:00 2001 From: cryptocode <34946442+cryptocode@users.noreply.github.com> Date: Fri, 24 Aug 2018 22:31:00 +0200 Subject: [PATCH] Remove unused code (#953) --- rai/node/node.cpp | 20 -------------------- rai/node/node.hpp | 1 - 2 files changed, 21 deletions(-) diff --git a/rai/node/node.cpp b/rai/node/node.cpp index ffe1df09..2fa3b6ea 100644 --- a/rai/node/node.cpp +++ b/rai/node/node.cpp @@ -1479,7 +1479,6 @@ void rai::block_processor::process_receive_many (std::unique_lock & { { rai::transaction transaction (node.store.environment, nullptr, true); - auto cutoff (std::chrono::steady_clock::now () + rai::transaction_timeout); lock_a.lock (); auto count (0); while (have_blocks () && count < 16384) @@ -2021,25 +2020,6 @@ rai::uint128_t rai::gap_cache::bootstrap_threshold (MDB_txn * transaction_a) return result; } -void rai::gap_cache::purge_old () -{ - auto cutoff (std::chrono::steady_clock::now () - std::chrono::seconds (10)); - std::lock_guard lock (mutex); - auto done (false); - while (!done && !blocks.empty ()) - { - auto first (blocks.get<1> ().begin ()); - if (first->arrival < cutoff) - { - blocks.get<1> ().erase (first); - } - else - { - done = true; - } - } -} - void rai::network::confirm_send (rai::confirm_ack const & confirm_a, std::shared_ptr> bytes_a, rai::endpoint const & endpoint_a) { if (node.config.logging.network_publish_logging ()) diff --git a/rai/node/node.hpp b/rai/node/node.hpp index 2db28aa3..7f4702b7 100644 --- a/rai/node/node.hpp +++ b/rai/node/node.hpp @@ -171,7 +171,6 @@ public: void add (MDB_txn *, std::shared_ptr); void vote (std::shared_ptr); rai::uint128_t bootstrap_threshold (MDB_txn *); - void purge_old (); boost::multi_index_container< rai::gap_information, boost::multi_index::indexed_by<