Changeset View
Changeset View
Standalone View
Standalone View
test/functional/mining_getblocktemplate_longpoll.py
Show All 25 Lines | class LongpollThread(threading.Thread): | ||||
def run(self): | def run(self): | ||||
self.node.getblocktemplate({'longpollid': self.longpollid}) | self.node.getblocktemplate({'longpollid': self.longpollid}) | ||||
class GetBlockTemplateLPTest(BitcoinTestFramework): | class GetBlockTemplateLPTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.num_nodes = 2 | self.num_nodes = 2 | ||||
def skip_test_if_missing_module(self): | |||||
self.skip_if_no_wallet() | |||||
def run_test(self): | def run_test(self): | ||||
self.log.info( | self.log.info( | ||||
"Warning: this test will take about 70 seconds in the best case. Be patient.") | "Warning: this test will take about 70 seconds in the best case. Be patient.") | ||||
self.nodes[0].generate(10) | self.nodes[0].generate(10) | ||||
templat = self.nodes[0].getblocktemplate() | templat = self.nodes[0].getblocktemplate() | ||||
longpollid = templat['longpollid'] | longpollid = templat['longpollid'] | ||||
# longpollid should not change between successive invocations if | # longpollid should not change between successive invocations if | ||||
# nothing else happens | # nothing else happens | ||||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |