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

Method __init__

test/functional/mining_getblocktemplate_longpoll.py:15–22  ·  view source on GitHub ↗
(self, node)

Source from the content-addressed store, hash-verified

13
14class LongpollThread(threading.Thread):
15 def __init__(self, node):
16 threading.Thread.__init__(self)
17 # query current longpollid
18 templat = node.getblocktemplate()
19 self.longpollid = templat['longpollid']
20 # create a new connection to the node, we can't use the same
21 # connection from two threads
22 self.node = get_rpc_proxy(node.url, 1, timeout=600, coveragedir=node.coverage_dir)
23
24 def run(self):
25 self.node.getblocktemplate({'longpollid':self.longpollid})

Callers

nothing calls this directly

Calls 1

get_rpc_proxyFunction · 0.90

Tested by

no test coverage detected