Follow-up from #46 / v0.4.2 verification.
Context
examples/integration_test.rs Step 19 ("Consolidate UTXOs") calls consolidate::check_and_consolidate with a hardcoded threshold (the threshold local; currently 10 UTXOs). The earlier steps in the test never accumulate more than 2-3 UTXOs on the sender party, so this step always skips:
[Step 19/20] Consolidate UTXOs (sender) .............. SKIPPED (2 < 10 threshold)
The consolidate parser in src/consolidate.rs is therefore never exercised end-to-end by this test. It WAS exercised by fixture unit tests added in #46 (parse_consolidate_response), but it'd be nice to also have the live ledger covered.
Proposal
Lower the threshold for the test run — let threshold: usize = 2; would always fire consolidation given the current UTXO count post-transfer-round-trip. Either:
- Hardcode
threshold = 2 in the test (simplest).
- Read it from an optional env var like
CONSOLIDATE_THRESHOLD (defaults to 2) so the test exercises consolidation by default but consumers can opt out.
Affected files
examples/integration_test.rs (Step 19 block, around line 768).
Out of scope
Anything in src/consolidate.rs. The library's threshold behavior is fine; only the integration test's chosen threshold is the issue.
Follow-up from #46 / v0.4.2 verification.
Context
examples/integration_test.rsStep 19 ("Consolidate UTXOs") callsconsolidate::check_and_consolidatewith a hardcoded threshold (thethresholdlocal; currently10UTXOs). The earlier steps in the test never accumulate more than 2-3 UTXOs on the sender party, so this step always skips:The consolidate parser in
src/consolidate.rsis therefore never exercised end-to-end by this test. It WAS exercised by fixture unit tests added in #46 (parse_consolidate_response), but it'd be nice to also have the live ledger covered.Proposal
Lower the threshold for the test run —
let threshold: usize = 2;would always fire consolidation given the current UTXO count post-transfer-round-trip. Either:threshold = 2in the test (simplest).CONSOLIDATE_THRESHOLD(defaults to 2) so the test exercises consolidation by default but consumers can opt out.Affected files
examples/integration_test.rs(Step 19 block, around line 768).Out of scope
Anything in
src/consolidate.rs. The library's threshold behavior is fine; only the integration test's chosen threshold is the issue.