aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests/test_peerlist.cpp
diff options
context:
space:
mode:
authorLee Clagett <code@leeclagett.com>2017-08-25 11:14:46 -0400
committerLee Clagett <code@leeclagett.com>2017-10-05 11:57:09 -0400
commit8b0068773525e585ce4c98d4ea2ce66dd6cf4aad (patch)
treedd14a8fb911acf97900548c7c1965c2d6a46a331 /tests/unit_tests/test_peerlist.cpp
parentMerge pull request #2518 (diff)
downloadmonero-8b0068773525e585ce4c98d4ea2ce66dd6cf4aad.tar.xz
Upgrades to epee::net_utils::network_address
- internal nullptr checks - prevent modifications to network_address (shallow copy issues) - automagically works with any type containing interface functions - removed fnv1a hashing - ipv4_network_address now flattened with no base class
Diffstat (limited to 'tests/unit_tests/test_peerlist.cpp')
-rw-r--r--tests/unit_tests/test_peerlist.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit_tests/test_peerlist.cpp b/tests/unit_tests/test_peerlist.cpp
index 4a546b50d..849020d25 100644
--- a/tests/unit_tests/test_peerlist.cpp
+++ b/tests/unit_tests/test_peerlist.cpp
@@ -38,7 +38,7 @@ TEST(peer_list, peer_list_general)
{
nodetool::peerlist_manager plm;
plm.init(false);
-#define MAKE_IPV4_ADDRESS(a,b,c,d,e) new epee::net_utils::ipv4_network_address(MAKE_IP(a,b,c,d),e)
+#define MAKE_IPV4_ADDRESS(a,b,c,d,e) epee::net_utils::ipv4_network_address{MAKE_IP(a,b,c,d),e}
#define ADD_GRAY_NODE(addr_, id_, last_seen_) { nodetool::peerlist_entry ple; ple.last_seen=last_seen_;ple.adr = addr_; ple.id = id_;plm.append_with_peer_gray(ple);}
#define ADD_WHITE_NODE(addr_, id_, last_seen_) { nodetool::peerlist_entry ple;ple.last_seen=last_seen_; ple.adr = addr_; ple.id = id_;plm.append_with_peer_white(ple);}