[alias-server] Add function to get only unprocessed txs from chronik tx history
Summary:
T2966
Depends on D13329
Add new getUnprocessedTxHistory function using previously introduced processedBlockheight and processedTxCount parameters.
Most of the time, getting the most recent page of chronik tx history will be enough. However there is a complicated edge case when more than 25 txs need to be fetched.
Test Plan:
node index.js, register new aliases and send non alias txs to alias registration address, see that unprocessed txs are picked up when the next block is found and logged
Review new unit tests and npm test
Change config.txHistoryPageSize to some value > 11 and npm test again. Tests still pass.
(Note that 2 unit tests are hardcoded to not require additional pages of data based on available mocks data of 11 unconfirmed and then confirmed txs).
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Differential Revision: https://reviews.bitcoinabc.org/D13333