MCPcopy Create free account
hub / github.com/ElementsProject/lightning / check_socket

Function check_socket

tests/test_gossip.py:1867–1877  ·  view source on GitHub ↗
(ip_addr, port)

Source from the content-addressed store, hash-verified

1865 "Channel announcement contains genesis hash, receiving node discards on mismatch"
1866)
1867def check_socket(ip_addr, port):
1868 result = True
1869 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1870 # let's also check for fatal and try it ;-)
1871 try:
1872 result = sock.connect_ex((ip_addr, port))
1873 sock.close()
1874 except Exception:
1875 return False
1876
1877 return not result
1878
1879
1880def test_static_tor_onions(node_factory):

Callers 2

test_static_tor_onionsFunction · 0.85
test_tor_port_onionsFunction · 0.85

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected