Skip to content

Commit

Permalink
Remove gap cache
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Feb 5, 2024
1 parent 42443a6 commit 072e4f0
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 415 deletions.
1 change: 0 additions & 1 deletion nano/core_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ add_executable(
enums.cpp
epochs.cpp
frontiers_confirmation.cpp
gap_cache.cpp
ipc.cpp
ledger.cpp
locks.cpp
Expand Down
168 changes: 0 additions & 168 deletions nano/core_test/gap_cache.cpp

This file was deleted.

20 changes: 0 additions & 20 deletions nano/core_test/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,26 +338,6 @@ TEST (node, auto_bootstrap_age)
node1->stop ();
}

// Test ensures the block processor adds the published block to the gap cache.
TEST (node, receive_gap)
{
nano::test::system system (1);
auto & node1 (*system.nodes[0]);
ASSERT_EQ (0, node1.gap_cache.size ());
auto block = nano::send_block_builder ()
.previous (5)
.destination (1)
.balance (2)
.sign (nano::keypair ().prv, 4)
.work (0)
.build_shared ();
node1.work_generate_blocking (*block);
nano::publish message{ nano::dev::network_params.network, block };
auto channel1 = std::make_shared<nano::transport::fake::channel> (node1);
node1.network.inbound (message, channel1);
ASSERT_TIMELY_EQ (5s, 1, node1.gap_cache.size ());
}

TEST (node, merge_peers)
{
nano::test::system system (1);
Expand Down
2 changes: 0 additions & 2 deletions nano/node/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ add_library(
election_insertion_result.hpp
epoch_upgrader.hpp
epoch_upgrader.cpp
gap_cache.hpp
gap_cache.cpp
inactive_cache_information.hpp
inactive_cache_information.cpp
inactive_cache_status.hpp
Expand Down
1 change: 0 additions & 1 deletion nano/node/blockprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ nano::process_return nano::block_processor::process_one (store::write_transactio
void nano::block_processor::queue_unchecked (store::write_transaction const & transaction_a, nano::hash_or_account const & hash_or_account_a)
{
node.unchecked.trigger (hash_or_account_a);
node.gap_cache.erase (hash_or_account_a.hash);
}

std::unique_ptr<nano::container_info_component> nano::collect_container_info (block_processor & block_processor, std::string const & name)
Expand Down
148 changes: 0 additions & 148 deletions nano/node/gap_cache.cpp

This file was deleted.

Loading

0 comments on commit 072e4f0

Please sign in to comment.