Skip to content

Commit

Permalink
Halving network fanout since the previous value was extremely conserv…
Browse files Browse the repository at this point in the history
…ative.
  • Loading branch information
clemahieu committed May 8, 2018
1 parent 2e90b99 commit e7ac637
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rai/core_test/peer_container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ TEST (peer_container, list_fanout)
ASSERT_FALSE (peers.insert (rai::endpoint (boost::asio::ip::address_v6::loopback (), 10000 + i), rai::protocol_version));
}
auto list2 (peers.list_fanout ());
ASSERT_EQ (64, list2.size ());
ASSERT_EQ (32, list2.size ());
}

TEST (peer_container, rep_weight)
Expand Down
2 changes: 1 addition & 1 deletion rai/node/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1830,7 +1830,7 @@ rai::process_return rai::node::process (rai::block const & block_a)
// Simulating with sqrt_broadcast_simulate shows we only need to broadcast to sqrt(total_peers) random peers in order to successfully publish to everyone with high probability
std::deque<rai::endpoint> rai::peer_container::list_fanout ()
{
auto peers (random_set (2 * size_sqrt ()));
auto peers (random_set (size_sqrt ()));
std::deque<rai::endpoint> result;
for (auto i (peers.begin ()), n (peers.end ()); i != n; ++i)
{
Expand Down

0 comments on commit e7ac637

Please sign in to comment.