MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / start

Method start

test/functional/feature_torcontrol.py:28–37  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

26 self.conn_ready = threading.Event()
27
28 def start(self):
29 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
30 self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
31 self.sock.settimeout(1.0)
32 self.sock.bind(('127.0.0.1', self.port))
33 self.sock.listen(1)
34 self.running = True
35 self.thread = threading.Thread(target=self._serve)
36 self.thread.daemon = True
37 self.thread.start()
38
39 def stop(self):
40 self.running = False

Callers 1

restart_with_mockMethod · 0.45

Calls 2

bindMethod · 0.80
listenMethod · 0.45

Tested by

no test coverage detected