From e3dea478594a202e2d90826c768a23c3d5b95f57 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 16 Apr 2019 22:23:15 +0000 Subject: [PATCH] unit_tests: undo is_blocked implementation factoring The is_host_blocked method is not on master yet --- tests/unit_tests/ban.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/unit_tests/ban.cpp b/tests/unit_tests/ban.cpp index c8ce19ba4..0b267172f 100644 --- a/tests/unit_tests/ban.cpp +++ b/tests/unit_tests/ban.cpp @@ -93,7 +93,18 @@ typedef nodetool::node_server hosts = server.get_blocked_hosts(); + for (auto rec: hosts) + { + if (rec.first == host) + { + if (t) + *t = rec.second; + return true; + } + } + return false; } TEST(ban, add)