mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
test: remove leftovers missed in bitcoin#25514 (dash#6097)
This commit is contained in:
parent
c7cb26ba05
commit
730cdf241a
@ -670,9 +670,6 @@ BOOST_AUTO_TEST_CASE(get_local_addr_for_peer_port)
|
|||||||
const uint16_t bind_port = 20001;
|
const uint16_t bind_port = 20001;
|
||||||
m_node.args->ForceSetArg("-bind", strprintf("3.4.5.6:%u", bind_port));
|
m_node.args->ForceSetArg("-bind", strprintf("3.4.5.6:%u", bind_port));
|
||||||
|
|
||||||
const uint32_t current_time = static_cast<uint32_t>(GetAdjustedTime());
|
|
||||||
SetMockTime(current_time);
|
|
||||||
|
|
||||||
// Our address:port as seen from the peer, completely different from the above.
|
// Our address:port as seen from the peer, completely different from the above.
|
||||||
in_addr peer_us_addr;
|
in_addr peer_us_addr;
|
||||||
peer_us_addr.s_addr = htonl(0x02030405);
|
peer_us_addr.s_addr = htonl(0x02030405);
|
||||||
@ -696,7 +693,7 @@ BOOST_AUTO_TEST_CASE(get_local_addr_for_peer_port)
|
|||||||
// Without the fix peer_us:8333 is chosen instead of the proper peer_us:bind_port.
|
// Without the fix peer_us:8333 is chosen instead of the proper peer_us:bind_port.
|
||||||
auto chosen_local_addr = GetLocalAddrForPeer(peer_out);
|
auto chosen_local_addr = GetLocalAddrForPeer(peer_out);
|
||||||
BOOST_REQUIRE(chosen_local_addr);
|
BOOST_REQUIRE(chosen_local_addr);
|
||||||
const CAddress expected{CService{peer_us_addr, bind_port}, NODE_NETWORK, current_time};
|
const CService expected{peer_us_addr, bind_port};
|
||||||
BOOST_CHECK(*chosen_local_addr == expected);
|
BOOST_CHECK(*chosen_local_addr == expected);
|
||||||
|
|
||||||
// Create a peer with a routable IPv4 address (inbound).
|
// Create a peer with a routable IPv4 address (inbound).
|
||||||
|
Loading…
Reference in New Issue
Block a user