Skip to content

feat(abstract-utxo): improve transaction signing test coverage#8041

Merged
OttoAllmendinger merged 3 commits intomasterfrom
BTC-2866.min-utxo-coins
Feb 4, 2026
Merged

feat(abstract-utxo): improve transaction signing test coverage#8041
OttoAllmendinger merged 3 commits intomasterfrom
BTC-2866.min-utxo-coins

Conversation

@OttoAllmendinger
Copy link
Contributor

@OttoAllmendinger OttoAllmendinger commented Feb 3, 2026

This PR enhances the UTXO transaction signing test infrastructure with
three main improvements:

  1. Move sign signTransaction tests to separate file

    • Support for PSBT with and without taprootKeyPathSpend inputs
    • Support for network transactions
    • Proper error handling for cache misses and unsupported scripts
    • Validation of signature and nonce counts
  2. Simplify test script configuration

    • Refactor transaction test suite with a unified approach
    • Dynamically select script types based on coin and transaction format
    • Replace multiple individual test combinations with cleaner logic
  3. Optimize test suite performance

    • Use minimal subset of test coins (BTC, BCH, ZEC) for full coverage
    • Significantly reduce test runtime
    • Refactor test utilities with helper functions
    • Improve script type validation logic

BTC-2866

OttoAllmendinger and others added 3 commits February 3, 2026 17:29
Add comprehensive tests for signTransaction functionality, covering:
- PSBT with taprootKeyPathSpend inputs
- PSBT without taprootKeyPathSpend inputs
- Network transactions
- Error handling for cache misses and unsupported locking scripts
- Validation of signature and nonce counts

Issue: BTC-2866

Co-authored-by: llm-git <llm-git@ttll.de>
Refactor transaction test suite to simplify script type selection
logic. Replace multiple individual test combinations with a unified
approach that dynamically selects appropriate script types based on
coin and transaction format.

Issue: BTC-2866

Co-authored-by: llm-git <llm-git@ttll.de>
Use a minimal subset of test coins (BTC, BCH, ZEC) that provides full
feature coverage while significantly reducing test runtime.

Refactor test utilities to support this optimization:
- Add `getMinUtxoCoins()` helper function
- Move shared code like `getScriptTypes()` and `TxFormat` to utilities
- Improve validation logic for different script types

Issue: BTC-2866

Co-authored-by: llm-git <llm-git@ttll.de>
@OttoAllmendinger OttoAllmendinger marked this pull request as ready for review February 3, 2026 16:51
@OttoAllmendinger OttoAllmendinger requested a review from a team as a code owner February 3, 2026 16:51
@OttoAllmendinger OttoAllmendinger merged commit 8e3d18f into master Feb 4, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants