diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2020-10-15 20:39:50 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2020-10-16 15:41:00 +0200 |
commit | b128b566725a5037fdaea99940d1b9de5553d198 (patch) | |
tree | a2b075f4752350d66a67d8822ae5909e42ca6160 /test/functional/mining_getblocktemplate_longpoll.py | |
parent | 8ee3536b2b77aeb3a48df5b34effbc7345ef34d8 (diff) |
test: add logging for mining_getblocktemplate_longpoll.py
Diffstat (limited to 'test/functional/mining_getblocktemplate_longpoll.py')
-rwxr-xr-x | test/functional/mining_getblocktemplate_longpoll.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/mining_getblocktemplate_longpoll.py b/test/functional/mining_getblocktemplate_longpoll.py index f4251cd642..2adafb1fdb 100755 --- a/test/functional/mining_getblocktemplate_longpoll.py +++ b/test/functional/mining_getblocktemplate_longpoll.py @@ -33,14 +33,14 @@ class GetBlockTemplateLPTest(BitcoinTestFramework): def run_test(self): self.log.info("Warning: this test will take about 70 seconds in the best case. Be patient.") + self.log.info("Test that longpollid doesn't change between successive getblocktemplate() invocations if nothing else happens") self.nodes[0].generate(10) template = self.nodes[0].getblocktemplate({'rules': ['segwit']}) longpollid = template['longpollid'] - # longpollid should not change between successive invocations if nothing else happens template2 = self.nodes[0].getblocktemplate({'rules': ['segwit']}) assert template2['longpollid'] == longpollid - # Test 1: test that the longpolling wait if we do nothing + self.log.info("Test that longpoll waits if we do nothing") thr = LongpollThread(self.nodes[0]) thr.start() # check that thread still lives @@ -48,13 +48,13 @@ class GetBlockTemplateLPTest(BitcoinTestFramework): assert thr.is_alive() miniwallets = [ MiniWallet(node) for node in self.nodes ] - # Test 2: test that longpoll will terminate if another node generates a block + self.log.info("Test that longpoll will terminate if another node generates a block") miniwallets[1].generate(1) # generate a block on another node # check that thread will exit now that new transaction entered mempool thr.join(5) # wait 5 seconds or until thread exits assert not thr.is_alive() - # Test 3: test that longpoll will terminate if we generate a block ourselves + self.log.info("Test that longpoll will terminate if we generate a block ourselves") thr = LongpollThread(self.nodes[0]) thr.start() miniwallets[0].generate(1) # generate a block on own node @@ -65,7 +65,7 @@ class GetBlockTemplateLPTest(BitcoinTestFramework): self.nodes[0].generate(100) self.sync_blocks() - # Test 4: test that introducing a new transaction into the mempool will terminate the longpoll + self.log.info("Test that introducing a new transaction into the mempool will terminate the longpoll") thr = LongpollThread(self.nodes[0]) thr.start() # generate a random transaction and submit it |