Release: develop -> main - #4447
Merged
Merged
Conversation
…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.
github-actions
Bot
requested review from
TaprootFreak and
davidleomay
as code owners
July 29, 2026 12:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatic Release PR
This PR was automatically created after changes were pushed to develop.
Commits: 1 new commit(s)
Checklist