HomePhabricator

[Chronik] Add `/script/:type/:payload/history`

Description

[Chronik] Add /script/:type/:payload/history

Summary:
This is sort-of the combination of /script/:type/:payload/confirmed-txs and /script/:type/:payload/unconfirmed-txs, except sorted in reverse-chronological order.

We start pages at the most recent mempool tx, go backwards in the mempool until we reach the oldest tx in the mempool, then continue with the most recent DB tx and go backwards from there.

Note that unlike confirmed_txs and unconfirmed_txs, the order of txs observed by fetching multiple pages can change if new txs are added, or the page size is changed. This is because txs are fetched from the DB the order they appear on the blockchain, and only then are sorted by time_first_seen.

Depends on D13613 and D13612.

Test Plan: ninja check-crates && ninja check-functional

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D13535

Details

Provenance
tobias_ruckAuthored on Apr 6 2023, 20:14
tobias_ruckPushed on Apr 12 2023, 16:45
Reviewer
Restricted Project
Differential Revision
D13535: [Chronik] Add `/script/:type/:payload/history`
Parents
rABCb8e5c1421fbe: [Chronik] Refactor tests: add genesis coinbase consts
Branches
Unknown
Tags
Unknown