This repository was archived by the owner on Oct 28, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1267,13 +1267,15 @@ BOOST_AUTO_TEST_CASE(changingHostEndpoint)
12671267 auto & nodeTable = nodeTableHost.nodeTable ;
12681268
12691269 auto const originalHostEndpoint = nodeTable->m_hostNodeEndpoint ;
1270+ auto const originalHostENR = nodeTable->hostENR ();
12701271 uint16_t const newPort = originalHostEndpoint.udpPort () + 1 ;
12711272 auto const newHostEndpoint = NodeIPEndpoint{
12721273 bi::address::from_string (c_localhostIp), newPort, nodeTable->m_hostNodeEndpoint .tcpPort ()};
12731274
12741275 for (int i = 0 ; i < 10 ; ++i)
12751276 {
12761277 BOOST_CHECK_EQUAL (nodeTable->m_hostNodeEndpoint , originalHostEndpoint);
1278+ BOOST_CHECK (nodeTable->hostENR ().signature () == originalHostENR.signature ());
12771279
12781280 // socket receiving PING
12791281 TestUDPSocketHost nodeSocketHost;
@@ -1302,7 +1304,12 @@ BOOST_AUTO_TEST_CASE(changingHostEndpoint)
13021304 nodeTable->packetsReceived .pop ();
13031305 }
13041306
1305- BOOST_REQUIRE_EQUAL (nodeTable->m_hostNodeEndpoint , newHostEndpoint);
1307+ BOOST_CHECK_EQUAL (nodeTable->m_hostNodeEndpoint , newHostEndpoint);
1308+
1309+ ENR const newENR = nodeTable->hostENR ();
1310+ BOOST_CHECK_EQUAL (newENR.ip (), newHostEndpoint.address ());
1311+ BOOST_CHECK_EQUAL (newENR.udpPort (), newHostEndpoint.udpPort ());
1312+ BOOST_CHECK_EQUAL (newENR.tcpPort (), newHostEndpoint.tcpPort ());
13061313}
13071314
13081315
You can’t perform that action at this time.
0 commit comments