From 30c4b160f18e8c05a43ffbb7ac91259d812125eb Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 29 May 2018 16:23:23 -0400 Subject: [PATCH] use epoll reactor for seed node script --- scripts/seed_node.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/seed_node.py b/scripts/seed_node.py index 18e349dbe..3f3268130 100644 --- a/scripts/seed_node.py +++ b/scripts/seed_node.py @@ -5,6 +5,8 @@ import argparse import hashlib from copy import deepcopy from urllib import urlopen +from twisted.internet.epollreactor import install as install_epoll +install_epoll() from twisted.internet import reactor, defer from twisted.web import resource from twisted.web.server import Site @@ -54,7 +56,7 @@ def format_contact(contact): class MultiSeedRPCServer(AuthJSONRPCServer): - def __init__(self, starting_node_port=4455, nodes=50, rpc_port=5280): + def __init__(self, starting_node_port, nodes, rpc_port): AuthJSONRPCServer.__init__(self, False) self.port = None self.rpc_port = rpc_port @@ -208,7 +210,7 @@ def main(): parser = argparse.ArgumentParser() parser.add_argument('--rpc_port', default=5280) parser.add_argument('--starting_port', default=4455) - parser.add_argument('--nodes', default=50) + parser.add_argument('--nodes', default=32) args = parser.parse_args() MultiSeedRPCServer(int(args.starting_port), int(args.nodes), int(args.rpc_port)) reactor.run()