Skip to content

Commit

Permalink
Fix fill_keepalive_self
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Apr 8, 2024
1 parent 52b4777 commit b1114dd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions nano/core_test/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1040,9 +1040,14 @@ TEST (network, filter_invalid_version_using)
TEST (network, fill_keepalive_self)
{
nano::test::system system{ 2 };
std::array<nano::endpoint, 8> target;
system.nodes[0]->network.fill_keepalive_self (target);
ASSERT_EQ (target[2].port (), system.nodes[1]->network.port);

auto get_keepalive = [&system] (nano::node & node) {
std::array<nano::endpoint, 8> target;
node.network.fill_keepalive_self (target);
return target;
};

ASSERT_TIMELY_EQ (5s, get_keepalive (system.node (0))[2].port (), system.nodes[1]->network.port);
}

/*
Expand Down

0 comments on commit b1114dd

Please sign in to comment.