Skip to content

Latest commit

 

History

History
153 lines (106 loc) · 3.59 KB

File metadata and controls

153 lines (106 loc) · 3.59 KB

Test Framework Fixes Summary

Date: November 4, 2025
Status: IN PROGRESS - Significant progress made


Test Files Fixed

1. checkqueue_tests.cpp ✅

Issue: CCheckQueue API changed

  • Constructor now takes worker_threads_num parameter
  • Threads start automatically in constructor
  • Removed StartWorkerThreads() and StopWorkerThreads() methods

Fixes Applied:

  • Updated all make_unique<Queue>(QUEUE_BATCH_SIZE) calls
  • Added SCRIPT_CHECK_THREADS parameter
  • Removed all manual thread management calls

2. blockencodings_tests.cpp ✅

Issue: Stream class renamed

  • CDataStreamDataStream

Fixes Applied:

  • Global find/replace of CDataStream with DataStream

3. cuckoocache_tests.cpp ✅

Issue: Random seed function renamed

  • SeedInsecureRand()SeedRandomForTest()

Fixes Applied:

  • Updated all function calls

4. util_tests.cpp ✅

Issue: Same as cuckoocache_tests.cpp

Fixes Applied:

  • Updated SeedInsecureRand to SeedRandomForTest

5. merkleblock_tests.cpp ✅

Issue: Type change in CMerkleBlock constructor

  • Old: std::set<uint256>
  • New: std::set<Txid>

Fixes Applied:

  • Added #include <util/transaction_identifier.h>
  • Changed std::set<uint256> to std::set<Txid>
  • Use Txid::FromUint256() to convert uint256 to Txid

6. miniscript_tests.cpp ✅

Issues: Multiple API changes

  1. Shuffle()std::shuffle()
  2. GetSerializeSize() no longer takes PROTOCOL_VERSION

Fixes Applied:

  • Added #include <algorithm>
  • Changed Shuffle() to std::shuffle()
  • Removed PROTOCOL_VERSION parameter from GetSerializeSize()

API Changes Identified

Random Functions

  • SeedInsecureRand()SeedRandomForTest()
  • Shuffle()std::shuffle()

Stream Classes

  • CDataStreamDataStream

Thread Management

  • CCheckQueue::StartWorkerThreads() removed
  • CCheckQueue::StopWorkerThreads() removed
  • Threads now managed automatically by constructor/destructor

Type System

  • uint256Txid for transaction identifiers
  • Use Txid::FromUint256() for conversion

Serialization

  • GetSerializeSize(obj, PROTOCOL_VERSION)GetSerializeSize(obj)

Test Files Still Needing Fixes

Based on the build, additional files may need fixes:

  • Other test files that use similar deprecated APIs
  • Files discovered during continued build

Build Status

Successful Compilations ✅

  • Main binaries: bitcoind, bitcoin-cli, bitcoin-tx, bitcoin-util
  • Many test files compiled successfully
  • 29+ test object files created

In Progress 🔄

  • Full test suite build
  • Discovering and fixing API incompatibilities

Lessons Learned

Common Patterns

  1. Check for renamed/removed functions
  2. Look for type system changes (uint256 vs Txid)
  3. API signature changes (added/removed parameters)
  4. Standard library usage (std:: prefix required)

Best Practices

  1. Add necessary includes (, <util/transaction_identifier.h>)
  2. Use proper type conversions (Txid::FromUint256)
  3. Check for parameter requirement changes
  4. Update to latest API patterns

Next Steps

  1. Continue make check build
  2. Fix remaining test file issues as discovered
  3. Run full test suite
  4. Document all API changes found
  5. Create migration guide for developers

Impact Assessment

Files Modified: 6+ test files
API Changes: 6 major changes identified
Build Progress: ~90% of tests compiling
Remaining Work: Fix remaining discovered issues


Status: Making excellent progress. Most common API changes identified and fixed.