test: cover desc address ordering on preview accounts/:stake_address/addresses - #106
Merged
Merged
Conversation
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.
What
Adds an
order=desccase for/accounts/{stake_address}/addressesto the preview fixture set. It reuses the account from the existing "bf stake address with many addresses" fixture.Why
descordering for this endpoint was only covered by a mainnet fixture. Implementations that run the suite against preview never exercise it. This gap let an ordering bug in dolos/minibf go unnoticed (see txpipe/dolos#1140, fixed by txpipe/dolos#1221).The account discriminates the common failure mode well. Its oldest address is also its most recently used one:
…surhhy9…snq24zy…srdg8p9Blockfrost orders addresses by first on-chain appearance, and
descreturns the exact reverse of theasclist:[…srdg8p9, …snq24zy, …surhhy9]. An implementation that ordersdescby latest appearance returns[…surhhy9, …snq24zy, …srdg8p9]instead — maximally wrong, so the test cannot pass by accident.Verification
ascfixture for the same account.update-fixtures-ids,check-fixture-wiring,type-check,lint, and unit tests all pass.🤖 Generated with Claude Code