Skip to content

Merge bitcoin/bitcoin#27944: test: various USDT functional test cleanups (27831 follow-ups)#926

Open
DashCoreAutoGuix wants to merge 1 commit into
backport-0.23-batch-665from
backport-0.26-batch-665-pr-27944
Open

Merge bitcoin/bitcoin#27944: test: various USDT functional test cleanups (27831 follow-ups)#926
DashCoreAutoGuix wants to merge 1 commit into
backport-0.23-batch-665from
backport-0.26-batch-665-pr-27944

Conversation

@DashCoreAutoGuix
Copy link
Copy Markdown
Owner

@DashCoreAutoGuix DashCoreAutoGuix commented Aug 3, 2025

Backports bitcoin#27944

Original commit: c5a63ea

Backported from Bitcoin Core v0.26

Note: The interface_usdt_mempool.py test was not included in this backport as it doesn't exist in Dash.

Summary by CodeRabbit

  • Tests
    • Improved test reliability and clarity by collecting and verifying events after execution rather than performing immediate assertions within callbacks.
    • Enhanced consistency in variable naming for message direction within test functions.
    • Refactored event handling in tests to simplify logic and improve robustness of test verification.

…31 follow-ups)

9f55773 test: refactor: usdt_mempool: store all events (stickies-v)
bc43270 test: refactor: remove unnecessary nonlocal (stickies-v)
326db63 test: log sanity check assertion failures (stickies-v)
f5525ad test: store utxocache events (stickies-v)
f1b99ac test: refactor: deduplicate handle_utxocache_* logic (stickies-v)
ad90ba3 test: refactor:  rename inbound to is_inbound (stickies-v)
afc0224 test: refactor: remove unnecessary blocks_checked counter (stickies-v)

Pull request description:

  Various cleanups to the USDT functional tests, largely (but not exclusively) follow-ups to bitcoin#27831 (review). 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.

ACKs for top commit:
  0xB10C:
    ACK 9f55773. Reviewed the code and ran the USDT interface tests. I stepped through the commits and think all changes are reasonable.

Tree-SHA512: 6c37a0265b6c26d4f9552a056a690b8f86f7304bd33b4419febd8b17369cf6af799cb87c16df35d0c2a1b839ad31de24661d4384eafa88816c2051c522fd3bf5
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 3, 2025

Walkthrough

Variable renaming and event handling logic were refactored in three functional test files. Counters and inline assertions in event handlers were replaced with event collection and post-processing assertions. Variable names related to message direction were standardized, and event comparison logic was moved outside of callbacks for clarity and robustness. No public interfaces were changed.

Changes

Cohort / File(s) Change Summary
Message Direction Variable Renaming
test/functional/interface_usdt_net.py
Renamed variables indicating message direction from inbound to is_inbound for consistency. Updated all references and removed an unnecessary nonlocal declaration. No logic changes.
UTXO Cache Event Handling Refactor
test/functional/interface_usdt_utxocache.py
Refactored test event handling: replaced counters and inline assertions with event collection and post-processing assertions. Introduced a helper for comparing UTXO events and improved robustness of test verification.
Block Validation Event Refactor
test/functional/interface_usdt_validation.py
Removed block counter variable; now collects events and performs assertions after polling. Simplified callback logic and moved validation outside the event handler.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3b3169d and ee8da15.

📒 Files selected for processing (3)
  • test/functional/interface_usdt_net.py (2 hunks)
  • test/functional/interface_usdt_utxocache.py (3 hunks)
  • test/functional/interface_usdt_validation.py (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
test/functional/**/*.py

📄 CodeRabbit Inference Engine (CLAUDE.md)

Functional tests should be placed in test/functional/ and written in Python

Files:

  • test/functional/interface_usdt_net.py
  • test/functional/interface_usdt_validation.py
  • test/functional/interface_usdt_utxocache.py
**

⚙️ CodeRabbit Configuration File

**: # CodeRabbit AI Review Instructions for Dash Backports

Your Role

You are reviewing Bitcoin Core backports to Dash Core. Your ONLY job is to validate that the Dash commit faithfully represents the original Bitcoin commit with minimal, necessary adaptations.

Critical Validation Rules

1. File Operations Must Match (AUTO-REJECT if violated)

  • If Bitcoin modifies an existing file → Dash MUST modify (not create new)
  • If Bitcoin creates a new file → Dash creates
  • If Bitcoin deletes a file → Dash deletes
  • Common failure: Bitcoin modifies keys.txt, Dash creates new file with 58 keys

2. Size Ratio Check (80-150% of Bitcoin)

  • Count functional lines changed (exclude comments/whitespace)
  • Dash changes should be 80-150% of Bitcoin's size
  • Red flag: 2-line Bitcoin fix becoming 150+ lines in Dash

3. No Scope Creep

  • Reject if you see: "TODO:", "FIXME:", "while we're here", "also fix"
  • No unrelated refactoring or style changes
  • Only Bitcoin's intended changes + minimal Dash adaptations

4. Bitcoin-Specific Code Detection

  • Auto-reject witness/segwit code: msg_wtxidrelay, MSG_WTX, witness imports
  • Auto-reject RBF (replace-by-fee) functionality
  • Note: PSBT is supported in Dash (don't flag)

5. Mandatory Adaptations Only

  • bitcoindash in strings/paths
  • BitcoinDash in user-facing text
  • Port numbers: 8332→9998 (RPC), 8333→9999 (P2P)
  • Hardcoded test values specific to Dash
  • No other changes unless absolutely required

6. Completeness Check

  • All files changed in Bitcoin must be present
  • Extra files need clear justification (Dash-specific compatibility)
  • Missing files = incomplete backport

Review Process

  1. First: Check file operations match exactly
  2. Second: Calculate size ratio
  3. Third: Scan for scope creep patterns
  4. Fourth: Detect Bitcoin-specific code
  5. Fifth: Verify all changes are minimal adaptations

Output Format

VALIDATION: [PASS/FAIL]

File Operatio...

Files:

  • test/functional/interface_usdt_net.py
  • test/functional/interface_usdt_validation.py
  • test/functional/interface_usdt_utxocache.py
🧠 Learnings (8)
📓 Common learnings
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-28T20:34:29.061Z
Learning: During Dash backport verification of Bitcoin Core commit 06d469c26b, scope creep was detected when additional pruning test functionality was added to interface_usdt_utxocache.py beyond what was in the original Bitcoin commit. The fix involved removing the extra test block while maintaining the core compiler flag fixes for USDT compilation errors.
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-28T22:03:12.364Z
Learning: During multiple verification attempts of Bitcoin Core commit 06d469c26b backport to Dash PR #566, DashCoreAutoGuix consistently identified scope creep in interface_usdt_utxocache.py where additional pruning test functionality was added beyond the original Bitcoin commit. The user provided comprehensive fixes including both scope creep removal and missing mempool test file additions, but couldn't push due to authentication restrictions. The scope creep fix was identified as the priority to resolve CI failures.
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-31T01:14:55.631Z
Learning: DashCoreAutoGuix successfully completed a complex Bitcoin Core backport (PR #29412) for block mutation detection by implementing the IsBlockMutated function, adding net processing integration, creating comprehensive unit tests, and properly adapting all Bitcoin-specific witness code for Dash compatibility. The backport maintains full security functionality while respecting Dash's non-witness transaction architecture.
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-29T21:29:32.827Z
Learning: DashCoreAutoGuix successfully fixed scope creep in Bitcoin Core commit fcdb39d3ee backport by removing the parse test case from src/test/uint256_tests.cpp that was not part of the original Bitcoin commit. The fix was implemented in commit 16748115ce and verified through range-diff analysis.
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-28T19:54:21.426Z
Learning: In Dash backports from Bitcoin Core, including necessary compilation fixes (such as API compatibility changes like UniValue get_int() → getInt<int>()) alongside the core backport is standard and expected practice. These compatibility fixes ensure the backported code compiles in Dash's evolved codebase while preserving Bitcoin's original functionality and intent.
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-30T14:45:15.700Z
Learning: In Dash backports from Bitcoin Core test files, the `address_to_scriptpubkey` function should be imported from `test_framework.wallet` instead of `test_framework.address` as the import location differs between Bitcoin and Dash test frameworks.
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-29T17:13:35.087Z
Learning: When backporting Bitcoin Core commits that use Python's textwrap.dedent() function in test files, the textwrap import statement needs to be explicitly added if it's missing in the Dash test file.
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-29T22:13:54.797Z
Learning: In Dash backports from Bitcoin Core, witness transaction-related code (MSG_WTX, wtxid) should be replaced with regular transaction handling (MSG_TX, txid) for compatibility, as demonstrated in the p2p_filter.py test fix where MSG_WTX was replaced with MSG_TX and irr_wtxid usage was replaced with irr_txid.
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-27T22:35:10.176Z
Learning: In Dash backports, src/dashbls files are vendored dependencies that should not be modified during Bitcoin Core backports unless there is specific justification. Unauthorized modifications to vendored dependencies should be removed to maintain code integrity.
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-30T14:45:15.700Z
Learning: The `add_wallet_options` method is not available in Dash's test framework and should be removed when backporting Bitcoin Core tests that use this method, as demonstrated in wallet_rescan_unconfirmed.py.
📚 Learning: in dash backports from bitcoin core, witness transaction-related code (msg_wtx, wtxid) should be rep...
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-29T22:13:54.797Z
Learning: In Dash backports from Bitcoin Core, witness transaction-related code (MSG_WTX, wtxid) should be replaced with regular transaction handling (MSG_TX, txid) for compatibility, as demonstrated in the p2p_filter.py test fix where MSG_WTX was replaced with MSG_TX and irr_wtxid usage was replaced with irr_txid.

Applied to files:

  • test/functional/interface_usdt_net.py
  • test/functional/interface_usdt_validation.py
  • test/functional/interface_usdt_utxocache.py
📚 Learning: in dash backports from bitcoin core test files, the `address_to_scriptpubkey` function should be imp...
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-30T14:45:15.700Z
Learning: In Dash backports from Bitcoin Core test files, the `address_to_scriptpubkey` function should be imported from `test_framework.wallet` instead of `test_framework.address` as the import location differs between Bitcoin and Dash test frameworks.

Applied to files:

  • test/functional/interface_usdt_net.py
  • test/functional/interface_usdt_utxocache.py
📚 Learning: during dash backport verification of bitcoin core commit 06d469c, scope creep was detected when a...
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-28T20:34:29.061Z
Learning: During Dash backport verification of Bitcoin Core commit 06d469c26b, scope creep was detected when additional pruning test functionality was added to interface_usdt_utxocache.py beyond what was in the original Bitcoin commit. The fix involved removing the extra test block while maintaining the core compiler flag fixes for USDT compilation errors.

Applied to files:

  • test/functional/interface_usdt_validation.py
  • test/functional/interface_usdt_utxocache.py
📚 Learning: during multiple verification attempts of bitcoin core commit 06d469c backport to dash pr #566, da...
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-28T22:03:12.364Z
Learning: During multiple verification attempts of Bitcoin Core commit 06d469c26b backport to Dash PR #566, DashCoreAutoGuix consistently identified scope creep in interface_usdt_utxocache.py where additional pruning test functionality was added beyond the original Bitcoin commit. The user provided comprehensive fixes including both scope creep removal and missing mempool test file additions, but couldn't push due to authentication restrictions. The scope creep fix was identified as the priority to resolve CI failures.

Applied to files:

  • test/functional/interface_usdt_validation.py
  • test/functional/interface_usdt_utxocache.py
📚 Learning: dashcoreautoguix successfully completed a complex bitcoin core backport (pr bitcoin#29412) for block mutati...
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-31T01:14:55.631Z
Learning: DashCoreAutoGuix successfully completed a complex Bitcoin Core backport (PR #29412) for block mutation detection by implementing the IsBlockMutated function, adding net processing integration, creating comprehensive unit tests, and properly adapting all Bitcoin-specific witness code for Dash compatibility. The backport maintains full security functionality while respecting Dash's non-witness transaction architecture.

Applied to files:

  • test/functional/interface_usdt_validation.py
📚 Learning: dashcoreautoguix successfully fixed scope creep in bitcoin core commit fcdb39d backport by removi...
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-29T21:29:32.827Z
Learning: DashCoreAutoGuix successfully fixed scope creep in Bitcoin Core commit fcdb39d3ee backport by removing the parse test case from src/test/uint256_tests.cpp that was not part of the original Bitcoin commit. The fix was implemented in commit 16748115ce and verified through range-diff analysis.

Applied to files:

  • test/functional/interface_usdt_utxocache.py
📚 Learning: the `add_wallet_options` method is not available in dash's test framework and should be removed when...
Learnt from: DashCoreAutoGuix
PR: DashCoreAutoGuix/dash#0
File: :0-0
Timestamp: 2025-07-30T14:45:15.700Z
Learning: The `add_wallet_options` method is not available in Dash's test framework and should be removed when backporting Bitcoin Core tests that use this method, as demonstrated in wallet_rescan_unconfirmed.py.

Applied to files:

  • test/functional/interface_usdt_utxocache.py
🧬 Code Graph Analysis (2)
test/functional/interface_usdt_net.py (2)
test/functional/test_framework/messages.py (1)
  • msg_version (1610-1664)
test/functional/test_framework/util.py (1)
  • assert_equal (69-74)
test/functional/interface_usdt_validation.py (1)
test/functional/test_framework/util.py (1)
  • assert_equal (69-74)
🪛 Ruff (0.12.2)
test/functional/interface_usdt_net.py

124-124: Missing return type annotation for private function check_p2p_message

Add return type annotation: None

(ANN202)


124-124: Missing type annotation for function argument event

(ANN001)


124-124: Missing type annotation for function argument is_inbound

(ANN001)


128-128: Logging statement uses f-string

(G004)

test/functional/interface_usdt_utxocache.py

264-264: Missing return type annotation for private function compare_utxo_with_event

Add return type annotation: None

(ANN202)


264-264: Missing type annotation for function argument utxo

(ANN001)


264-264: Missing type annotation for function argument event

(ANN001)


272-272: Missing return type annotation for private function handle_utxocache_add

Add return type annotation: None

(ANN202)


272-272: Missing type annotation for function argument _

(ANN001)


272-272: Missing type annotation for function argument data

(ANN001)


272-272: Missing type annotation for function argument __

(ANN001)


274-274: Logging statement uses f-string

(G004)


277-277: Missing return type annotation for private function handle_utxocache_spent

Add return type annotation: None

(ANN202)


277-277: Missing type annotation for function argument _

(ANN001)


277-277: Missing type annotation for function argument data

(ANN001)


277-277: Missing type annotation for function argument __

(ANN001)


279-279: Logging statement uses f-string

(G004)


322-322: Logging statement uses f-string

(G004)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
  • GitHub Check: x86_64-w64-mingw32 / Build depends
  • GitHub Check: Lint / Run linters
  • GitHub Check: x86_64-apple-darwin / Build depends
  • GitHub Check: x86_64-pc-linux-gnu_nowallet / Build depends
  • GitHub Check: arm-linux-gnueabihf / Build depends
  • GitHub Check: x86_64-pc-linux-gnu / Build depends
  • GitHub Check: Lint / Run linters
  • GitHub Check: x86_64-pc-linux-gnu_nowallet / Build depends
  • GitHub Check: x86_64-apple-darwin / Build depends
  • GitHub Check: x86_64-w64-mingw32 / Build depends
  • GitHub Check: arm-linux-gnueabihf / Build depends
  • GitHub Check: x86_64-pc-linux-gnu / Build depends
🔇 Additional comments (8)
test/functional/interface_usdt_net.py (2)

124-124: Variable renaming improves clarity.

The renaming from inbound to is_inbound makes the boolean nature of the parameter clearer and follows better naming conventions.


159-160: Consistent variable usage after renaming.

The loop correctly uses the renamed is_inbound variable, maintaining consistency throughout the function.

test/functional/interface_usdt_utxocache.py (4)

259-262: Event collection approach improves test robustness.

The switch from counter-based validation to collecting actual events allows for more detailed post-processing assertions and avoids issues with exceptions in ctypes callbacks.


264-270: Helper function enhances code reusability.

The compare_utxo_with_event function centralizes the comparison logic between UTXO dictionaries and BPF events, improving maintainability.


318-327: Post-processing assertions provide better test validation.

Moving assertions outside the event handlers allows for comprehensive validation after all events are collected, which is more reliable than immediate assertions in callbacks.


357-363: Exception handling prevents test failures from assertion errors.

The try-except blocks properly handle assertion failures in ctypes callbacks while still allowing the test to track success/failure counts.

test/functional/interface_usdt_validation.py (2)

102-102: Event collection simplifies callback logic.

Switching from counter tracking to event collection in the callback follows the same pattern as other test files and improves robustness.


127-127: Post-processing validation ensures correct event count.

Using len(events) for validation after event collection provides the same verification as the previous counter approach but with better error handling.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch backport-0.26-batch-665-pr-27944

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@DashCoreAutoGuix
Copy link
Copy Markdown
Owner Author

✅ Backport Verification Successful

No issues found! This backport is complete and faithful to the original Bitcoin change.

Original Bitcoin commit: c5a63ea56f8
Backport PR: #926
Reviewed commit hash: ee8da15b2a4-verify-1754216722

Verification Details:

  • File operations match Bitcoin's intent
  • No missing changes detected (mempool USDT test doesn't exist in Dash)
  • No scope creep or dependency explosions
  • CI checks passing (39/39 tests successful)
  • PR comments reviewed and addressed

Reviewer Feedback Analysis:

PastaPastaPasta comments reviewed: 0
Other human comments reviewed: 0

No reviewer feedback to address - PR is ready for review.

Technical Analysis:

This PR successfully backports Bitcoin's USDT functional test cleanups. The missing test/functional/interface_usdt_mempool.py file is expected since this test doesn't exist in Dash's codebase. The 74.2% size ratio is appropriate for test refactoring that excludes non-applicable components.

This PR is ready for merge. ✅

@DashCoreAutoGuix DashCoreAutoGuix added the verified Backport verification passed - ready for merge label Aug 3, 2025
@PastaPastaPasta PastaPastaPasta removed the verified Backport verification passed - ready for merge label Dec 3, 2025
@DashCoreAutoGuix DashCoreAutoGuix added the verified Backport verification passed - ready for merge label Dec 6, 2025
@DashCoreAutoGuix
Copy link
Copy Markdown
Owner Author

✅ Verification Complete - APPROVED

This backport of Bitcoin Core PR bitcoin#27944 has been verified and approved.

Verification Summary

Bitcoin Commit: c5a63ea
Files Changed: 3/4 (mempool test intentionally excluded)
CI Status: ✅ All 51 checks passing

Changes Verified

All three modified test files correctly implement the Bitcoin changes:

  1. interface_usdt_net.py - Variable renamed inboundis_inbound, removed unnecessary nonlocal
  2. interface_usdt_utxocache.py - Refactored to collect all events before assertions, added try-except blocks for sanity checks
  3. interface_usdt_validation.py - Removed blocks counter, moved assertions from callback to main loop

Intentionally Excluded

  • interface_usdt_mempool.py - File does not exist in Dash (documented in PR description)

Dash Adaptations

  • Preserved existing cflags parameter in validation test (pre-existing Dash-specific requirement)

The backport faithfully implements the USDT test cleanup refactoring from Bitcoin Core with appropriate handling of Dash's test suite differences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

verified Backport verification passed - ready for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants