You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
Copy file name to clipboardExpand all lines: key-wallet-ffi/FFI_API.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -230,15 +230,15 @@ Functions: 108
230
230
| `managed_account_collection_summary_data` | Get structured account collection summary data for managed collection ... | managed_account_collection |
231
231
| `managed_account_collection_summary_free` | Free a managed account collection summary and all its allocated memory #... | managed_account_collection |
232
232
| `managed_core_account_free` | Free a managed account handle # Safety - `account` must be a valid pointer... | managed_account |
233
-
| `managed_core_account_free_transactions` | Free transactions array returned by managed_core_account_get_transactions #... | managed_account |
233
+
| `managed_core_account_free_transactions` | Free transactions array returned by managed_core_account_get_transactions ... | managed_account |
234
234
| `managed_core_account_get_account_type` | Get the account type of a managed account # Safety - `account` must be a... | managed_account |
235
235
| `managed_core_account_get_address_pool` | Get an address pool from a managed account by type This function returns... | managed_account |
236
236
| `managed_core_account_get_balance` | Get the balance of a managed account # Safety - `account` must be a valid... | managed_account |
237
237
| `managed_core_account_get_external_address_pool` | Get the external address pool from a managed account This function returns... | managed_account |
238
238
| `managed_core_account_get_index` | Get the account index from a managed account Returns the primary account... | managed_account |
239
239
| `managed_core_account_get_internal_address_pool` | Get the internal address pool from a managed account This function returns... | managed_account |
240
240
| `managed_core_account_get_network` | Get the network of a managed account # Safety - `account` must be a valid... | managed_account |
241
-
| `managed_core_account_get_transaction_count` | Get the number of transactions in a managed account # Safety - `account`... | managed_account |
241
+
| `managed_core_account_get_transaction_count` | Get the number of transactions in a managed account Only available with the... | managed_account |
242
242
| `managed_core_account_get_transactions` | Get all transactions from a managed account Returns an array of... | managed_account |
243
243
| `managed_core_account_get_utxo_count` | Get the number of UTXOs in a managed account # Safety - `account` must be... | managed_account |
244
244
| `managed_platform_account_free` | Free a managed platform account handle # Safety - `account` must be a... | managed_account |
Free transactions array returned by managed_core_account_get_transactions # Safety - `transactions` must be a pointer returned by `managed_core_account_get_transactions` - `count` must be the count returned by `managed_core_account_get_transactions` - This function must only be called once per allocation
3050
+
Free transactions array returned by managed_core_account_get_transactions Only available with the `keep-finalized-transactions` Cargo feature, in which configuration `managed_core_account_get_transactions` is also available — the two functions are paired. # Safety - `transactions` must be a pointer returned by `managed_core_account_get_transactions` - `count` must be the count returned by `managed_core_account_get_transactions` - This function must only be called once per allocation
3051
3051
3052
3052
**Safety:**
3053
3053
- `transactions` must be a pointer returned by `managed_core_account_get_transactions` - `count` must be the count returned by `managed_core_account_get_transactions` - This function must only be called once per allocation
Get the number of transactions in a managed account # Safety - `account` must be a valid pointer to an FFIManagedCoreAccount instance
3178
+
Get the number of transactions in a managed account Only available with the `keep-finalized-transactions` Cargo feature. With the feature off (the default), records of chainlocked transactions are dropped from the in-memory map, so the count would not reflect the full history — the function is intentionally not exposed. # Safety - `account` must be a valid pointer to an FFIManagedCoreAccount instance
3179
3179
3180
3180
**Safety:**
3181
3181
- `account` must be a valid pointer to an FFIManagedCoreAccount instance
@@ -3191,7 +3191,7 @@ managed_core_account_get_transactions(account: *const FFIManagedCoreAccount, tra
3191
3191
```
3192
3192
3193
3193
**Description:**
3194
-
Get all transactions from a managed account Returns an array of FFITransactionRecord structures. # Safety - `account` must be a valid pointer to an FFIManagedCoreAccount instance - `transactions_out` must be a valid pointer to receive the transactions array pointer - `count_out` must be a valid pointer to receive the count - The caller must free the returned array using `managed_core_account_free_transactions`
3194
+
Get all transactions from a managed account Returns an array of FFITransactionRecord structures. Only available with the `keep-finalized-transactions` Cargo feature. With the feature off (the default), records of chainlocked transactions are dropped from the in-memory map, so this would only return a partial history — the function is intentionally not exposed. # Safety - `account` must be a valid pointer to an FFIManagedCoreAccount instance - `transactions_out` must be a valid pointer to receive the transactions array pointer - `count_out` must be a valid pointer to receive the count - The caller must free the returned array using `managed_core_account_free_transactions`
3195
3195
3196
3196
**Safety:**
3197
3197
- `account` must be a valid pointer to an FFIManagedCoreAccount instance - `transactions_out` must be a valid pointer to receive the transactions array pointer - `count_out` must be a valid pointer to receive the count - The caller must free the returned array using `managed_core_account_free_transactions`
0 commit comments