aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2018-11-15 00:24:38 -0500
committerDeterminant <ted.sybil@gmail.com>2018-11-15 00:24:38 -0500
commit82bd1d81e918cc8a1a46b6c36a81cbba43750bb1 (patch)
tree046e0e51dd6a035a0bc8f4c2686f8e1a28caa43f /test
parent389a9a56e00225b0e682d64cb05e5291c23892b0 (diff)
use a simple worker selection policy; add todo-list
Diffstat (limited to 'test')
-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) {}