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
{{ message }}
Repository navigation
platform-wallet: keep the DashPay backfill coverage codec and delivery policy out of FFI/JNI #5505
Two pieces of DashPay backfill coverage logic that platform-wallet owns are duplicated in binding crates:
rs-unified-sdk-jni (persistence.rs) re-implements the persisted coverage format: it defines the 72-byte entry width, validates blob alignment, decides to discard malformed records and decodes each field. platform-wallet already owns this codec and its malformed-blob contract (DashPayBackfillRecord::from_parts, with covered_bytes as the inverse), and the JNI write path re-implements the packing too.
rs-platform-wallet-ffi (persistence.rs) decides whether a backfill record is delivered to the host (atomic changesets, cursor presence, cursor callback delivery). That is coverage eligibility policy, which platform-wallet owns through persists_backfill_coverage and settle_published_backfill.
A future change to the format or the delivery rules then needs synchronized edits in Rust, FFI and Android.
Proposal
Expose owner-backed encode/decode through platform-wallet (and platform-wallet-ffi for JNI) and have the bindings call it; move the record-delivery decision into platform-wallet, leaving the adapters to marshal the selected record and report delivery results. Behaviour stays the same.
Activity