aboutsummaryrefslogtreecommitdiff
path: root/test/test_p2p_min.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_p2p_min.cpp')
-rw-r--r--test/test_p2p_min.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/test_p2p_min.cpp b/test/test_p2p_min.cpp
index a221d79..bc62eda 100644
--- a/test/test_p2p_min.cpp
+++ b/test/test_p2p_min.cpp
@@ -43,7 +43,14 @@ int main() {
for (size_t i = 0; i < nodes.size(); i++)
for (size_t j = 0; j < nodes.size(); j++)
if (i != j)
- nodes[i].second->add_peer(nodes[j].first);
+ {
+ auto &node = nodes[i].second;
+ auto &peer_addr = nodes[j].first;
+ salticidae::PeerId pid{peer_addr};
+ node->add_peer(pid);
+ node->set_peer_addr(pid, peer_addr);
+ node->conn_peer(pid);
+ }
ec.dispatch();
return 0;
}