- Using a single MiniWallet is enough.
- A random fee isn't needed either.
test: Flatten miniwallet array and remove random fee in longpoll #26996
pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2301-test-log-😀 changing 1 files +5 −9-
maflcko commented at 3:46 PM on January 30, 2023: member
-
DrahtBot commented at 3:46 PM on January 30, 2023: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers ACK theStack If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
- DrahtBot renamed this:
test: Log when LongpollThread is ending
test: Log when LongpollThread is ending
on Jan 30, 2023 - DrahtBot added the label Tests on Jan 30, 2023
- maflcko force-pushed on Jan 30, 2023
-
in test/functional/mining_getblocktemplate_longpoll.py:18 in fa6a2be8ef outdated
12 | @@ -14,8 +13,9 @@ 13 | 14 | 15 | class LongpollThread(threading.Thread): 16 | - def __init__(self, node): 17 | + def __init__(self, node, log): 18 | threading.Thread.__init__(self) 19 | + self.log = log
kouloumos commented at 4:54 PM on January 30, 2023:Is there an advantage of passing
loginstead ofself.log = logging.getLogger('TestFramework')
maflcko commented at 4:48 PM on March 7, 2023:Thanks, dropped the commit
in test/functional/mining_getblocktemplate_longpoll.py:28 in fa6a2be8ef outdated
24 | @@ -25,6 +25,7 @@ def __init__(self, node): 25 | 26 | def run(self): 27 | self.node.getblocktemplate({'longpollid': self.longpollid, 'rules': ['segwit']}) 28 | + self.log.info("LongpollThread ending")
kouloumos commented at 5:42 PM on January 30, 2023:Maybe logging the thread id could add even more value? Something like:

maflcko commented at 4:49 PM on March 7, 2023:Thanks, dropped the commit
kouloumos commented at 6:10 PM on January 30, 2023: contributorTwo questions:
- Is there an example where logging the end of a thread in such a way could offer an advantage during debugging?
- Is this a good opportunity to also replace bare asserts with assertion helpers based on #23119? The PRs that are doing that in batches seems to be not moving forward, so I was wondering if opportunistically changing them could be another way.
Based on my questions above and some comments that I left inline, I did some changes to see in practice what I was thinking. You can find them here (diff).
fanquake requested review from theStack on Mar 7, 2023theStack approvedtheStack commented at 4:20 PM on March 7, 2023: contributorACK fa6a2be8eff9b67e5f6e378c2d5999981804c692
maflcko commented at 4:29 PM on March 7, 2023: memberSorry, this slipped the inbox. I'll reply to the feedback
maflcko commented at 4:31 PM on March 7, 2023: memberIs there an example where logging the end of a thread in such a way could offer an advantage during debugging?
Good point. It probably doesn't. It should already be clear from the assertion being hit (or not being hit) whether the thread exited or not.
test: Flatten miniwallet array and remove random fee in longpoll fa0abcdafemaflcko force-pushed on Mar 7, 2023maflcko renamed this:test: Log when LongpollThread is ending
test: Flatten miniwallet array and remove random fee in longpoll
on Mar 7, 2023DrahtBot renamed this:test: Flatten miniwallet array and remove random fee in longpoll
test: Flatten miniwallet array and remove random fee in longpoll
on Mar 7, 2023fanquake requested review from theStack on Mar 7, 2023fanquake requested review from kouloumos on Mar 7, 2023theStack approvedtheStack commented at 5:21 PM on March 8, 2023: contributorre-ACK fa0abcdafeb74aa7a312095becd55b1cee48cd99
fanquake merged this on Mar 8, 2023fanquake closed this on Mar 8, 2023sidhujag referenced this in commit e9a97c1802 on Mar 8, 2023maflcko deleted the branch on Mar 10, 2023bitcoin locked this on Mar 9, 2024
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-24 09:14 UTC
More mirrored repositories can be found on mirror.b10c.me