Skip to content

feat(key-wallet): add keep-finalized-transactions Cargo feature#733

Merged
QuantumExplorer merged 4 commits intov0.42-devfrom
claude/keep-finalized-transactions
May 7, 2026
Merged

feat(key-wallet): add keep-finalized-transactions Cargo feature#733
QuantumExplorer merged 4 commits intov0.42-devfrom
claude/keep-finalized-transactions

Conversation

@QuantumExplorer
Copy link
Copy Markdown
Member

@QuantumExplorer QuantumExplorer commented May 5, 2026

Summary

Opt-in keep-finalized-transactions Cargo feature that drops the full TransactionRecord for transactions that have reached a finalized state (InstantSend lock or ChainLock — both signal the transaction can never change state again) and keeps only the txid in a per-account finalized_txids: HashSet<Txid>. Bounds memory growth in long-lived wallets without losing dedup.

Public API

Added to ManagedAccountTrait (always available, both feature configs):

  • fn has_transaction(&self, txid: &Txid) -> bool — true if the tx is either still in transactions (active) or has been dropped into finalized_txids (finalized). Used as the dedup signal in confirm_transaction.
  • fn transaction_is_finalized(&self, txid: &Txid) -> bool — true only when the txid is in finalized_txids. Always false with the feature off (no finalization tracking).

ManagedAccountTransactionsTrait::transactions() / transactions_mut() remain as before. With the feature on the map only contains non-finalized records — finalized ones are gone, so iterating the map will not see them.

confirm_transaction now returns Option<TransactionRecord> instead of bool. The record is cloned BEFORE any finalization so callers can still emit events even when the record has just been dropped from the map.

TransactionContext::is_finalized() returns true for InstantSend(_) or InChainLockedBlock(_).

Behavior

  • record_transaction(.., context, ..) — if context.is_finalized(), the record is inserted then immediately dropped, with the txid added to finalized_txids. Returns the cloned record.
  • confirm_transaction(.., context, ..) — short-circuits when the txid is already finalized (no record left to update). Otherwise updates the existing context, captures the record, then finalizes if the new context is finalized.
  • mark_instant_send_utxos (wallet-level) — also calls finalize_transaction so IS-lock arrivals through that path drop the record consistently.

Defaults

  • Cargo feature is OFF by default.
  • Dev-dep on key-wallet enables it, so cargo test -p key-wallet runs the feature-on path. Existing tests that explicitly asserted record content after IS-lock/chainlock are gated to #[cfg(not(feature = \"keep-finalized-transactions\"))].
  • key-wallet-manager and key-wallet-ffi expose a keep-finalized-transactions feature that forwards to key-wallet.

Test plan

  • cargo build --workspace (default — feature off) builds
  • cargo build --workspace --features key-wallet-ffi/keep-finalized-transactions builds
  • cargo test -p key-wallet --lib --test-threads=1 — 463 passed (feature on via dev-dep, includes 4 new feature tests)
  • cargo test -p key-wallet --no-default-features --features test-utils,serde,bincode,getrandom,bls,eddsa,bip38 --lib --test-threads=1 — 463 passed (feature off; gates the new tests, exercises legacy ones)
  • cargo test -p key-wallet-manager --all-features — 31/7/5/2/0 ✅
  • cargo clippy --workspace --tests clean
  • cargo fmt --check clean

New focused tests in key-wallet/src/tests/keep_finalized_transactions_tests.rs:

  • instantsend_drops_record_and_records_finalization — mempool → IS-lock drops the record; has_transaction still true; transaction_is_finalized true.
  • chainlock_drops_record_and_records_finalization — InBlock alone is NOT finalization; chainlock drops the record.
  • first_sighting_already_finalized_drops_record_immediately — record + finalize in a single call when the first event is IS-lock.
  • replays_after_finalize_dont_double_count_or_resurrect_record — stale block events for already-finalized txs don't resurrect the record or change UTXOs/balance.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added keep-finalized-transactions feature flag to enable full transaction history retention in wallets (by default, finalized transactions are pruned).
  • Documentation

    • Updated FFI API documentation to clarify that transaction history functions are only available with the feature enabled.
  • Tests

    • Added comprehensive tests validating transaction record retention behavior with and without the feature.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

Review Change Stack

Warning

Rate limit exceeded

@QuantumExplorer has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 53 minutes and 45 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f89d7c3c-6a86-442f-a14c-65ec16565004

📥 Commits

Reviewing files that changed from the base of the PR and between eb5afa2 and 13ed52c.

📒 Files selected for processing (1)
  • key-wallet/Cargo.toml
📝 Walkthrough

Walkthrough

This PR introduces a keep-finalized-transactions Cargo feature flag that controls wallet transaction record retention when transactions reach chain-locked finality. When enabled, full transaction records persist in memory; when disabled (default), chainlocked records are dropped and only their txids retained for deduplication.

Changes

Keep-Finalized-Transactions Feature and Implementation

Layer / File(s) Summary
Feature Definitions
key-wallet/Cargo.toml, key-wallet-manager/Cargo.toml, key-wallet-ffi/Cargo.toml, dash-spv-ffi/Cargo.toml
Feature flag cascades from base library through manager and FFI layers; dev-dependency enables end-to-end testing.
Trait and Type Contracts
key-wallet/src/managed_account/managed_account_trait.rs, key-wallet/src/transaction_checking/transaction_context.rs
ManagedAccountTrait adds has_transaction and transaction_is_finalized methods; TransactionContext adds is_chain_locked detector.
Core Funds Account
key-wallet/src/managed_account/managed_core_funds_account.rs
confirm_transaction returns Option<TransactionRecord> instead of bool; record_transaction gates finalized pruning on chainlock context; trait implementations delegate presence and finality checks.
Keys Account State Management
key-wallet/src/managed_account/managed_core_keys_account.rs
Conditionally adds finalized_txids: HashSet and drop_finalized_transaction helper when pruning; trait implementations check both records and txid set depending on feature state.
Transaction Checking Integration
key-wallet/src/transaction_checking/wallet_checker.rs
Uses new trait methods (has_transaction, transaction_is_finalized) instead of direct map access; refactored finality detection and updated confirmation return handling to Option.
FFI Public API Gating
key-wallet-ffi/src/managed_account.rs, key-wallet-ffi/FFI_API.md
Transaction history query functions (get_transaction_count, get_transactions, free_transactions) feature-gated with conditional test compilation and documentation.
Tests and Validation
key-wallet/src/tests/keep_finalized_transactions_tests.rs, key-wallet/src/tests/mod.rs
Four comprehensive tests validate feature-ON record persistence, feature-OFF record pruning, IS-lock vs chainlock finality semantics, and txid-based query fallback.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related issues

Poem

🐰 The wallet now recalls or forgets,
Depending on what we let it set—
ChainLocks bring finality true,
Txids remember what we lose, too! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately and concisely describes the main feature addition: introducing a new Cargo feature flag called 'keep-finalized-transactions' to the key-wallet crate.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/keep-finalized-transactions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

❌ Patch coverage is 93.61702% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.26%. Comparing base (68dff90) to head (13ed52c).

Files with missing lines Patch % Lines
...-wallet/src/transaction_checking/wallet_checker.rs 81.81% 2 Missing ⚠️
.../src/managed_account/managed_core_funds_account.rs 95.23% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           v0.42-dev     #733      +/-   ##
=============================================
- Coverage      71.43%   71.26%   -0.18%     
=============================================
  Files            320      320              
  Lines          68770    68798      +28     
=============================================
- Hits           49128    49028     -100     
- Misses         19642    19770     +128     
Flag Coverage Δ
core 76.51% <ø> (ø)
ffi 44.70% <100.00%> (-1.51%) ⬇️
rpc 20.00% <ø> (ø)
spv 87.61% <ø> (+0.07%) ⬆️
wallet 70.10% <93.02%> (+0.02%) ⬆️
Files with missing lines Coverage Δ
key-wallet-ffi/src/managed_account.rs 52.13% <100.00%> (ø)
...allet/src/managed_account/managed_account_trait.rs 37.24% <ø> (ø)
...t/src/managed_account/managed_core_keys_account.rs 58.97% <100.00%> (+4.68%) ⬆️
...et/src/transaction_checking/transaction_context.rs 64.10% <100.00%> (+2.99%) ⬆️
.../src/managed_account/managed_core_funds_account.rs 76.74% <95.23%> (+0.60%) ⬆️
...-wallet/src/transaction_checking/wallet_checker.rs 99.21% <81.81%> (-0.18%) ⬇️

... and 19 files with indirect coverage changes

Copy link
Copy Markdown
Member Author

@QuantumExplorer QuantumExplorer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self Reviewed

@QuantumExplorer
Copy link
Copy Markdown
Member Author

This replaces #709

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them.

@github-actions github-actions Bot added the merge-conflict The PR conflicts with the target branch. label May 6, 2026
Copy link
Copy Markdown
Collaborator

@xdustinface xdustinface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will lead to missing out on block confirmations for transactions. We should not see transactions as "finalized" or however you wanna call it until they are confirmed fully confirmed via a chainlock (either at the height they are mined or a later height if the confiming block didnt receive a chainlock) i think.

// path so e.g. an IS-locked record can transition to ChainLock
// when the surrounding block confirmation arrives.
#[cfg(not(feature = "keep-finalized-transactions"))]
if self.keys.transaction_is_finalized(&txid) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you will never know when transaction gets confirmed in chain now?

// the `#[allow(unused_variables)]` keeps clippy happy when the
// `keep-finalized-transactions` feature is on (no `let _ = ...`
// cfg shim required).
#[allow(unused_variables)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use the feature gate here too?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping!

// the `#[allow(unused_variables)]` keeps clippy happy when the
// `keep-finalized-transactions` feature is on (no `let _ = ...`
// cfg shim required).
#[allow(unused_variables)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping!

{
return self.finalized_txids.contains(txid);
}
#[allow(unreachable_code)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems a bit strange.. should use the feature gate properly?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping!

@QuantumExplorer QuantumExplorer force-pushed the claude/keep-finalized-transactions branch from afe76d9 to a7fca52 Compare May 6, 2026 09:40
@github-actions github-actions Bot removed the merge-conflict The PR conflicts with the target branch. label May 6, 2026
Copy link
Copy Markdown
Collaborator

@xdustinface xdustinface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a side note, we can still get this PR still in for now i guess but at the moment this will not work really because chainlocks are not propagated/processed in the wallet at this point. There is some work required first to wire them up and some thoughts need to be put in how we deal with historical transactions and if we want to emit events for all of them on after initial sync after the first received chainlock.

Also left few more comments, unused code should be dropped, some renaming we should do i think and the proper feature usage probably makes sense to do too.

/// Use [`Self::transaction_is_finalized_in_block`] for the stricter
/// "fully confirmed in a chainlocked block" answer that drives
/// memory-pruning decisions.
fn transaction_is_finalized(&self, txid: &Txid) -> bool;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unused.

/// height / block hash before the chainlock catches up). Only
/// `InChainLockedBlock` qualifies. This is the trigger for dropping
/// the full record under the default feature configuration.
fn transaction_is_finalized_in_block(&self, txid: &Txid) -> bool;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fn transaction_is_finalized_in_block(&self, txid: &Txid) -> bool;
fn transaction_is_finalized(&self, txid: &Txid) -> bool;

This should probably be just called transaction_is_finalized then now when the original one gets dropped to align with the naming of the feature.

/// Returns `true` if this account has already processed `txid`,
/// whether it's still mutable in `transactions` or has been
/// finalized-and-pruned (under the default feature configuration).
/// Used as the dedup signal in `confirm_transaction`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Used as the dedup signal in `confirm_transaction`.

This seems off? How does it dedup there?

// the `#[allow(unused_variables)]` keeps clippy happy when the
// `keep-finalized-transactions` feature is on (no `let _ = ...`
// cfg shim required).
#[allow(unused_variables)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping!

// the `#[allow(unused_variables)]` keeps clippy happy when the
// `keep-finalized-transactions` feature is on (no `let _ = ...`
// cfg shim required).
#[allow(unused_variables)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping!

{
return self.finalized_txids.contains(txid);
}
#[allow(unreachable_code)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping!

{
return self.finalized_txids.contains(txid);
}
#[allow(unreachable_code)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proper use of the feature gate?

/// ChainLock as final. Use [`Self::is_finalized_in_block`] for the
/// stricter "fully confirmed in a chainlocked block" answer that
/// drives memory-pruning decisions.
pub fn is_finalized(&self) -> bool {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unused, should be dropped.

/// block confirmation may still arrive and write the height /
/// block hash before the chainlock catches up). Only
/// `InChainLockedBlock` qualifies.
pub fn is_finalized_in_block(&self) -> bool {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub fn is_finalized_in_block(&self) -> bool {
pub fn is_chain_locked(&self) -> bool {

We have is_instant_send above so i think we should go with ^ here.

QuantumExplorer and others added 3 commits May 7, 2026 16:14
By default, records of chainlocked transactions are now dropped from
each managed account's in-memory `transactions` map; only their txids
are retained (in a new `finalized_txids` set on `ManagedCoreKeysAccount`)
to keep dedup, `has_transaction`, and finality queries working. The
opt-in `keep-finalized-transactions` Cargo feature reverts to the
old behavior — every processed transaction stays in the map for the
wallet's lifetime.

The drop is driven off `TransactionContext::is_finalized_in_block`
(chainlock only), not `is_finalized` (chainlock or IS-lock), so
IS-locked records survive long enough to absorb the surrounding
block-confirmation event (xdustinface review on #709).

`confirm_transaction` now returns `Option<TransactionRecord>` so
callers always observe the record even when it's about to be dropped.

The feature is forwarded through `key-wallet-manager` and
`key-wallet-ffi`. Three FFI accessors that walk the full
`transactions` map (`managed_core_account_get_transaction_count`,
`managed_core_account_get_transactions`,
`managed_core_account_free_transactions`) are gated to the feature
because they would otherwise return a partial history.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Integration tests under `dash-spv-ffi/tests/dashd_sync/` walk the full
per-account transaction history (`managed_core_account_get_transactions`,
`managed_core_account_get_transaction_count`,
`managed_core_account_free_transactions`) to verify end-to-end wallet
sync against a regtest dashd. These accessors are gated behind the
`keep-finalized-transactions` feature on `key-wallet-ffi`, so under the
default feature set they aren't compiled in and the test build fails to
resolve the imports.

Add `key-wallet-ffi` as a dev-dependency with the feature enabled.
Cargo unifies features across the build graph at test time, which
makes the gated accessors available in the test binaries without
expanding the lib crate's default feature surface.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Address xdustinface review feedback on PR #733:

- Drop `TransactionContext::is_finalized()` (the soft IS-or-chainlock
  check). The wallet now treats only a chainlock as finality.
- Rename `TransactionContext::is_finalized_in_block()` to
  `is_chain_locked()` so the predicate name describes the variant
  rather than overloading "finalized" — same naming style as the
  existing `is_instant_send()` helper.
- Drop `ManagedAccountTrait::transaction_is_finalized()` (the
  unused soft-finality variant) and rename
  `transaction_is_finalized_in_block()` to `transaction_is_finalized()`.
  Now that there's a single finalization concept, the trait method
  name aligns with the feature name.
- Replace runtime `if cfg!(...) { ... } else { ... }` branches in
  `ManagedCoreKeysAccount::has_transaction` and
  `transaction_is_finalized` with two `#[cfg]`-gated function bodies
  — one per feature configuration. Same for the chainlock-driven
  drop call in `confirm_transaction` / `record_transaction`: the
  `let drop_now = …` binding now only exists when the feature is off,
  removing the `#[allow(unused_variables)]` workaround.
- Rewrite the doc on `has_transaction` so it's clear what it actually
  reports (live record OR finalized-txid marker) and how callers use
  it (distinguish brand-new sightings from re-processings) instead of
  the misleading "dedup signal in `confirm_transaction`" wording.

Drop logic still triggers on the strict `is_chain_locked()` check —
IS-locked-but-not-yet-chainlocked records still survive so the
surrounding block-confirmation event can populate height / block
hash before the chainlock catches up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@QuantumExplorer QuantumExplorer force-pushed the claude/keep-finalized-transactions branch from 2f0f2e9 to eb5afa2 Compare May 7, 2026 09:22
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
key-wallet/src/tests/keep_finalized_transactions_tests.rs (1)

1-155: ⚡ Quick win

Align this new test module with the repository’s required test-module layout.

Please move/merge these cases into one of the prescribed key-wallet/src/tests modules (e.g., transaction-focused module) instead of introducing a new top-level test filename.

As per coding guidelines, key-wallet/src/tests/**/*.rs: "Organize unit tests by functionality into separate test modules: account_tests.rs, address_pool_tests.rs, transaction_tests.rs, wallet_tests.rs, integration_tests.rs, balance_tests.rs, spent_outpoints_tests.rs, special_transaction_tests.rs, advanced_transaction_tests.rs, managed_account_collection_tests.rs, backup_restore_tests.rs, edge_case_tests.rs, performance_tests.rs".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@key-wallet/src/tests/keep_finalized_transactions_tests.rs` around lines 1 -
155, You created a new top-level test file with several transaction-focused
tests (test_chainlocked_record_kept_when_feature_on,
test_chainlocked_record_dropped_when_feature_off,
test_islocked_record_kept_when_feature_off,
test_islocked_then_chainlocked_drops_at_chainlock) which violates the repo
test-module layout; move/merge these tests into the existing transaction test
module (e.g., key-wallet/src/tests/transaction_tests.rs). To fix: remove this
new file and copy each test function (preserving their cfg attributes and tokio
signatures) into transaction_tests.rs, add or reconcile required imports
(ManagedAccountTrait, TestWalletContext, BlockInfo, TransactionContext,
InstantLock where cfg(not(feature = "keep-finalized-transactions"))), and run
cargo test to ensure no duplicate symbols or missing imports; adjust any
module-level docs to match surrounding tests and keep the tests grouped by
functionality in transaction_tests.rs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@key-wallet/Cargo.toml`:
- Around line 27-28: Update the feature documentation comment that references
the old method name `transaction_is_finalized_in_block` to the current API
method `transaction_is_finalized`; specifically, replace the stale symbol in the
comment so it matches the implemented API name (e.g., update any occurrence of
`transaction_is_finalized_in_block` to `transaction_is_finalized` near the
feature docs mentioning `has_transaction` / `transaction_is_finalized`).

---

Nitpick comments:
In `@key-wallet/src/tests/keep_finalized_transactions_tests.rs`:
- Around line 1-155: You created a new top-level test file with several
transaction-focused tests (test_chainlocked_record_kept_when_feature_on,
test_chainlocked_record_dropped_when_feature_off,
test_islocked_record_kept_when_feature_off,
test_islocked_then_chainlocked_drops_at_chainlock) which violates the repo
test-module layout; move/merge these tests into the existing transaction test
module (e.g., key-wallet/src/tests/transaction_tests.rs). To fix: remove this
new file and copy each test function (preserving their cfg attributes and tokio
signatures) into transaction_tests.rs, add or reconcile required imports
(ManagedAccountTrait, TestWalletContext, BlockInfo, TransactionContext,
InstantLock where cfg(not(feature = "keep-finalized-transactions"))), and run
cargo test to ensure no duplicate symbols or missing imports; adjust any
module-level docs to match surrounding tests and keep the tests grouped by
functionality in transaction_tests.rs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3b9d0bdb-919d-4d45-b9ad-6fd64a818a6a

📥 Commits

Reviewing files that changed from the base of the PR and between 68dff90 and eb5afa2.

📒 Files selected for processing (13)
  • dash-spv-ffi/Cargo.toml
  • key-wallet-ffi/Cargo.toml
  • key-wallet-ffi/FFI_API.md
  • key-wallet-ffi/src/managed_account.rs
  • key-wallet-manager/Cargo.toml
  • key-wallet/Cargo.toml
  • key-wallet/src/managed_account/managed_account_trait.rs
  • key-wallet/src/managed_account/managed_core_funds_account.rs
  • key-wallet/src/managed_account/managed_core_keys_account.rs
  • key-wallet/src/tests/keep_finalized_transactions_tests.rs
  • key-wallet/src/tests/mod.rs
  • key-wallet/src/transaction_checking/transaction_context.rs
  • key-wallet/src/transaction_checking/wallet_checker.rs

Comment thread key-wallet/Cargo.toml Outdated
The previous commit renamed the trait method to `transaction_is_finalized`
but missed this Cargo.toml feature-doc reference. Caught by CodeRabbit on
PR #733.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@QuantumExplorer QuantumExplorer merged commit 8dd5f1b into v0.42-dev May 7, 2026
37 checks passed
@QuantumExplorer QuantumExplorer deleted the claude/keep-finalized-transactions branch May 7, 2026 10:04
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