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

Method __init__

test/functional/interface_http.py:30–34  ·  view source on GitHub ↗
(self, node)

Source from the content-addressed store, hash-verified

28
29class BitcoinHTTPConnection:
30 def __init__(self, node):
31 self.url = urllib.parse.urlparse(node.url)
32 self.authpair = f'{self.url.username}:{self.url.password}'
33 self.headers = {"Authorization": f"Basic {str_to_b64str(self.authpair)}"}
34 self.reset_conn()
35
36 def reset_conn(self):
37 self.conn = http.client.HTTPConnection(self.url.hostname, self.url.port)

Callers

nothing calls this directly

Calls 2

reset_connMethod · 0.95
str_to_b64strFunction · 0.90

Tested by

no test coverage detected