bark, server: Skip unspendable VTXOs on maintenance refresh

  • check or remove this line after you've added a CHANGELOG entry or if your PR doesn't need one (they should go into CHANGELOG/unreleased/)

This purpose here is to allow maintenance to always complete if possible. If for any reason the user can't spend a VTXO because the server rejects it then the wallet should skip those problematic VTXOs and proceed in refreshing the others. I haven't changed the behaviour of the other refresh APIs, this only applies to maintenance. Additionally, this requires introducing more validation on the server up front to check the users VTXOs, however this happens after the users attestation verifies.

Summary by CodeRabbit

  • Bug Fixes
    • Maintenance refresh is now exclusion-aware: when the server rejects specific inputs, only those are dropped and the wallet retries with remaining healthy VTXOs.
    • Server rejection errors now surface the specific rejected VTXO identifiers so recovery can be targeted instead of failing the whole operation.
  • Breaking Changes
    • Removed Wallet::maybe_schedule_maintenance_refresh; maintenance refresh behavior now joins the in-flight attempt when applicable.
  • New Features
    • Added Wallet::get_vtxos_to_refresh_with_excluded to choose refreshable VTXOs while skipping a provided excluded set.
Edited by coderabbit

Merge request reports

Loading