Skip to content

Release: develop -> main - #4447

Merged
TaprootFreak merged 1 commit into
mainfrom
develop
Jul 29, 2026
Merged

Release: develop -> main#4447
TaprootFreak merged 1 commit into
mainfrom
develop

Conversation

@github-actions

Copy link
Copy Markdown

Automatic Release PR

This PR was automatically created after changes were pushed to develop.

Commits: 1 new commit(s)

Checklist

  • Review all changes
  • Verify CI passes
  • Approve and merge when ready for production

…part in the amount+date fallback (#4443)

* fix(log): let receivers with an unconsumed reference take part in the amount+date fallback

Bank->Scrypt senders were only retired when pass 1 found reference equality or when the receiver carried no reference at all. Scrypt returns deposit txIds in several shapes (DEPOSIT-<payoutId>, but also pmt_* and raw UUIDs); a deposit whose txId does not align with the sender remittance info was therefore invisible to both passes and its sender stayed in the toScrypt pending bucket until the 7-day cutoff, inflating the reported total balance.

Pass 1 is unchanged. Only references that actually retired a sender count as consumed; every other receiver now takes part in the amount+date matching.

* fix(log): mark a receiver as consumed when its reference matches any known sender

Receivers are read over a 21-day window (unbounded in minId mode) while getUnmatchedSenders caps senders at 7 days. Deriving the consumed set from the recent senders alone left a receiver whose own sender had aged out available for the amount+date fallback, where it could retire an unrelated sender whose money is still genuinely in transit.

Adds coverage for the aged-out sender case, for the date-window rejection and for the Scrypt->bank direction, where the sender carries no txId at all and the receiver's remittance info matches nothing.

* test(log): sharpen the date-window guard and align fixture naming

The date-window test used a reference-less receiver, so it took the short-circuit branch of the candidate filter and never touched the widened set. It now uses a referenced-but-unconsumed receiver, pinning that the newly admitted receivers are still subject to the 7-day window.

Renames the aged-out fixtures to the senderOld/senderNew convention already used in this file and narrows a test title that promised a date-tolerance check it never ran.
@TaprootFreak
TaprootFreak merged commit 68286d8 into main Jul 29, 2026
10 checks passed
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.

1 participant