stickies-v
commented at 3:58 pm on June 23, 2023:
contributor
Various cleanups to the USDT functional tests, largely (but not exclusively) follow-ups to #27831#pullrequestreview-1491438045. Except for slightly different logging behaviour in “test: store utxocache events” and “test: log sanity check assertion failures”, this is a refactor PR, removing unnecessary code and (imo) making it more readable and maintainable.
The rationale for each change is in the corresponding commit message.
Note: except for “test: store utxocache events” (which relies on its parent, and I separated into two commits because we may want the parent but not the child), all commits are stand-alone and I’m okay with dropping one/multiple commits if they turn out to be controversial or undesired.
Carve out the comparison logic into a helper function to avoid
code duplication.
f1b99ac94f
test: store utxocache events
By storing the events instead of doing the comparison inside the
handle_utxocache_* functions, we simplify the overall logic and
potentially making debugging easier, by allowing pdb to access the
events.
Mostly a refactor, but changes logging behaviour slightly by not
raising and not calling self.log.exception("Assertion failed")
Since we're only mutating, and not reassigning, we don't need to
declare `events` as `nonlocal`.
bc43270450
test: refactor: usdt_mempool: store all events
Even though we expect these functions to only produce one event,
we still keep a counter to check if that's true. By simply storing
all the events, we can remove the counters and make debugging
easier, by allowing pdb to access the events.
9f55773a37
DrahtBot
commented at 3:58 pm on June 23, 2023:
contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviews
See the guideline for information on the review process.
virtu
commented at 8:10 am on June 29, 2023:
contributor
Concept ACK. Will take a closer look and test next week.
russeree
commented at 10:33 am on August 23, 2023:
contributor
Tested, still need to review code further.
0xB10C
commented at 4:47 pm on September 9, 2023:
contributor
ACK9f55773a370a0d039e727445ccee6b84e05f562a. Reviewed the code and ran the USDT interface tests. I stepped through the commits and think all changes are reasonable.
DrahtBot removed review request from 0xB10C
on Sep 9, 2023
fanquake merged this
on Sep 10, 2023
fanquake closed this
on Sep 10, 2023
stickies-v deleted the branch
on Sep 10, 2023
Frank-GER referenced this in commit
a27a634c3d
on Sep 19, 2023
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: 2024-11-23 09:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me