Page MenuHomePhabricator

[chronik-client] Properly handle txs ordering in the test
ClosedPublic

Authored by Fabien on Mon, May 12, 22:17.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABCe29827cea629: [chronik-client] Properly handle txs ordering in the test
Summary

Unconfirmed txs are sorted by time first seen, then txid.
Confirmed txs are sorted by txid.
History txs are sorted by reverse time first seen, then reverse txid.

Let's not assume the time is the same in the test, because time first seen is not mockable. Instead we actually perform the appropriated sort.

Test Plan
./contrib/teamcity/build-configurations.py chronik-client-integration-tests

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Mon, May 12, 22:17
PiRK added inline comments.
test/functional/setup_scripts/chronik-client_plugins.py
237–238 ↗(On Diff #53960)
237–238 ↗(On Diff #53960)

optional suggestions. The bytes flipping + explicit byteorder specification hurts my brain.

This revision is now accepted and ready to land.Tue, May 13, 06:04
test/functional/setup_scripts/chronik-client_plugins.py
237–238 ↗(On Diff #53960)

the idea was that "big" is the default after python 3.11 so it will eventually get removed, but you're right it's easier to read that way