Skip to content

Commit

Permalink
Set inactive votes cache size to 0 as it causes excessive vote relaying.
Browse files Browse the repository at this point in the history
  • Loading branch information
clemahieu committed May 19, 2022
1 parent d39088d commit 0c5c2b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions nano/node/active_transactions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,11 @@ std::size_t nano::active_transactions::inactive_votes_cache_size ()

void nano::active_transactions::add_inactive_votes_cache (nano::unique_lock<nano::mutex> & lock_a, nano::block_hash const & hash_a, nano::account const & representative_a, uint64_t const timestamp_a)
{
if (node.flags.inactive_votes_cache_size == 0)
{
return;
}

// Check principal representative status
if (node.ledger.weight (representative_a) > node.minimum_principal_weight ())
{
Expand Down
2 changes: 1 addition & 1 deletion nano/node/nodeconfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class node_flags final
std::size_t block_processor_batch_size{ 0 };
std::size_t block_processor_full_size{ 65536 };
std::size_t block_processor_verification_size{ 0 };
std::size_t inactive_votes_cache_size{ 16 * 1024 };
std::size_t inactive_votes_cache_size{ 0 };
std::size_t vote_processor_capacity{ 144 * 1024 };
std::size_t bootstrap_interval{ 0 }; // For testing only
};
Expand Down

0 comments on commit 0c5c2b1

Please sign in to comment.