#36601 test: avoid reusing AssumeUTXO coin insertion method in test fixtures
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #36601 test: avoid reusing AssumeUTXO coin insertion method in test fixtures | Ready | 1 | Strong | 0 + 10 tests | |||
|
|
|
|
| |||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | |||||||
Goal
Replaces usages of EmplaceCoinInternalDANGER with AddCoin and SpendCoin in unit test fixtures for the coin cache. It limits the use of EmplaceCoinInternalDANGER to dedicated fuzz, simulation, and duplicate-insertion tests that explicitly test snapshot coin insertion.
Problem: Coin-cache test fixtures in coins_tests.cpp and coinsviewoverlay_tests.cpp use EmplaceCoinInternalDANGER to set up test state. Because that method is an internal bypass intended strictly for AssumeUTXO snapshot loading, using it in routine test fixtures unnecessarily couples standard cache tests to snapshot-specific mechanisms.
Evidence of importance:
- Author description notes this decouples standard test fixtures and follows an earlier review suggestion on PR #35295 (discussion_r3421846300).
- Author notes this is extracted from PR #36598 to allow independent review.
Scope: Small test-only change (+10/-6 across two test files).
Risk of a mistake: low (tests). Touches only unit test fixtures in coins_tests.cpp and coinsviewoverlay_tests.cpp; a bug would only cause false test failures.
Reviewability
Ready
Nothing known that would invalidate a review now.
Waiting on (from the thread read):
- nothing
Agreement
Strong
substantive support, no open objection (Hamza1610)
Thread notes: Initial record. PR received a Tested ACK from Hamza1610 with no objections or suggestions raised. / Initial record. Hamza1610 provided a Tested ACK running unit tests.
Objections, suggestions, and questions: none recorded.
Support:
- Hamza1610 (none) (Tested ACK, 2026-10-23) [tested: coins_tests, coinsviewoverlay_tests]: clean and structured changes; passed coins_tests and coinsviewoverlay_tests
Participants:
- Hamza1610 (none, support, 1 statements 2026-10-23 to 2026-10-23): Tested ACK with test suite execution
Dependencies
Files
16 lines under test/bench/ci.
- src/test/coinsviewoverlay_tests.cpp +8/-4
- src/test/coins_tests.cpp +2/-2
Card
The short text the ranking pass compares across PRs.
This PR replaces calls to EmplaceCoinInternalDANGER with AddCoin and SpendCoin across several coin cache unit test fixtures. It resolves the misuse of an internal AssumeUTXO snapshot-loading method for standard test fixture setup, keeping routine test coverage cleanly separated from snapshot loading internals. The change follows a review suggestion from PR #35295 and is extracted as an independent prerequisite for PR #36598.
Data
thread read through 2026-10-23 (1 statements), head 1c62336903
labels: Tests