aboutsummaryrefslogtreecommitdiff
path: root/test/test_p2p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_p2p.cpp')
-rw-r--r--test/test_p2p.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test_p2p.cpp b/test/test_p2p.cpp
index f902afa..99c28a0 100644
--- a/test/test_p2p.cpp
+++ b/test/test_p2p.cpp
@@ -75,10 +75,11 @@ const uint8_t MsgAck::opcode;
using MyNet = salticidae::PeerNetwork<uint8_t>;
-NetAddr addrs[] = {
+std::vector<NetAddr> addrs = {
NetAddr("127.0.0.1:12345"),
NetAddr("127.0.0.1:12346"),
- NetAddr("127.0.0.1:12347")
+ NetAddr("127.0.0.1:12347"),
+ NetAddr("127.0.0.1:12348")
};
void signal_handler(int) {
@@ -97,7 +98,7 @@ int main(int argc, char **argv) {
int i;
net.start();
net.listen(addrs[i = atoi(argv[1])]);
- for (int j = 0; j < 3; j++)
+ for (int j = 0; j < addrs.size(); j++)
if (i != j) net.add_peer(addrs[j]);
ec.dispatch();
} catch (salticidae::SalticidaeError &e) {}