Skip to content

Commit b128b56

Browse files
committed
test: add logging for mining_getblocktemplate_longpoll.py
1 parent 8ee3536 commit b128b56

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/functional/mining_getblocktemplate_longpoll.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,28 @@ def set_test_params(self):
3333

3434
def run_test(self):
3535
self.log.info("Warning: this test will take about 70 seconds in the best case. Be patient.")
36+
self.log.info("Test that longpollid doesn't change between successive getblocktemplate() invocations if nothing else happens")
3637
self.nodes[0].generate(10)
3738
template = self.nodes[0].getblocktemplate({'rules': ['segwit']})
3839
longpollid = template['longpollid']
39-
# longpollid should not change between successive invocations if nothing else happens
4040
template2 = self.nodes[0].getblocktemplate({'rules': ['segwit']})
4141
assert template2['longpollid'] == longpollid
4242

43-
# Test 1: test that the longpolling wait if we do nothing
43+
self.log.info("Test that longpoll waits if we do nothing")
4444
thr = LongpollThread(self.nodes[0])
4545
thr.start()
4646
# check that thread still lives
4747
thr.join(5) # wait 5 seconds or until thread exits
4848
assert thr.is_alive()
4949

5050
miniwallets = [ MiniWallet(node) for node in self.nodes ]
51-
# Test 2: test that longpoll will terminate if another node generates a block
51+
self.log.info("Test that longpoll will terminate if another node generates a block")
5252
miniwallets[1].generate(1) # generate a block on another node
5353
# check that thread will exit now that new transaction entered mempool
5454
thr.join(5) # wait 5 seconds or until thread exits
5555
assert not thr.is_alive()
5656

57-
# Test 3: test that longpoll will terminate if we generate a block ourselves
57+
self.log.info("Test that longpoll will terminate if we generate a block ourselves")
5858
thr = LongpollThread(self.nodes[0])
5959
thr.start()
6060
miniwallets[0].generate(1) # generate a block on own node
@@ -65,7 +65,7 @@ def run_test(self):
6565
self.nodes[0].generate(100)
6666
self.sync_blocks()
6767

68-
# Test 4: test that introducing a new transaction into the mempool will terminate the longpoll
68+
self.log.info("Test that introducing a new transaction into the mempool will terminate the longpoll")
6969
thr = LongpollThread(self.nodes[0])
7070
thr.start()
7171
# generate a random transaction and submit it

0 commit comments

Comments
 (0)