Skip to content

Add test coverage for custom expiry_delta in create_proposed_transactions#2

Draft
aphelionz with Copilot wants to merge 8 commits into
aphelionz/configurable-expiryfrom
copilot/explore-codebase-configurable-expiry
Draft

Add test coverage for custom expiry_delta in create_proposed_transactions#2
aphelionz with Copilot wants to merge 8 commits into
aphelionz/configurable-expiryfrom
copilot/explore-codebase-configurable-expiry

Conversation

Copilot AI commented May 28, 2026

Copy link
Copy Markdown

The expiry_delta parameter in create_proposed_transactions was only tested with None. This adds integration test coverage for custom expiry values.

Changes

  • Test helper (zcash_client_backend/src/data_api/testing.rs): Add create_proposed_transactions_with_expiry_delta method gated behind non-standard-fees feature
  • Integration test (zcash_client_backend/src/data_api/testing/pool.rs): Add send_single_step_proposed_transfer_with_custom_expiry that verifies custom expiry delta (20 blocks) produces correct expiry height
  • SQLite wiring: Add wrapper and test entry in zcash_client_sqlite
  • Feature flag: Enable non-standard-fees for zcash_client_backend in sqlite dev-dependencies

Example

// Test verifies custom expiry is applied correctly
let custom_delta = 20u32;
let result = st.create_proposed_transactions_with_expiry_delta(
    usk, OvkPolicy::Sender, &proposal, Some(custom_delta)
);

let expected_expiry = proposal.min_target_height() + custom_delta;
assert_eq!(tx.expiry_height(), expected_expiry);

Copilot AI and others added 4 commits May 28, 2026 13:39
Add Builder::expiry_height() accessor and Builder::with_expiry_delta()
method (gated behind non-standard-fees feature) to allow customizing
transaction expiry windows for wallet recovery scenarios.

Co-Authored-By: Claude <noreply@anthropic.com>
…iry_delta

Add a new function that allows specifying a custom expiry delta when
executing transaction proposals. This is useful for wallet recovery
scenarios where a shorter expiry window is desired for replacement
transactions.

Co-Authored-By: Claude <noreply@anthropic.com>
…ta parameter

Removed create_proposed_transactions_with_expiry_delta and added an optional
expiry_delta: Option<u32> parameter (gated by non-standard-fees feature) to
create_proposed_transactions. This simplifies the API while maintaining the
same functionality.
Copilot AI changed the title feat: Add configurable transaction expiry delta Consolidate create_proposed_transactions API with optional expiry_delta parameter May 28, 2026
Copilot AI added 3 commits May 29, 2026 02:37
- Add create_proposed_transactions_with_expiry_delta helper in testing.rs
- Add send_single_step_proposed_transfer_with_custom_expiry test in pool.rs
- Enable non-standard-fees feature in zcash_client_sqlite dev-dependencies
- Test verifies custom expiry delta (20 blocks) produces correct expiry height
Address code review feedback: use the constant instead of hardcoded 40
Copilot AI changed the title Consolidate create_proposed_transactions API with optional expiry_delta parameter Add test coverage for custom expiry_delta in create_proposed_transactions May 29, 2026
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