[alias-server] Determine most recently processed blockheight on new block found
Summary:
T2966
Per updated task, it is more memory efficient and imo less prone to errors if, instead of caching the entire tx history, we instead just process through unprocessed blockheights.
This diff gets the highest processed blockheight. Future diffs will use this info to process only unseen confirmed txs.
Test Plan:
npm run mocks and confirm that validAliasesInDb is organized by blockheight least to greatest
node index.js and confirm processedBlockheight appears in console.log. Register a new alias. Confirm processedBlockheight increases on next block found.
In mongo, db.validAliasTxs.drop(), then node index.js
Confirm processedBlockheight is initially zero, then corresponds with most recent blockheight with valid alias txs on next block found
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Subscribers: emack
Differential Revision: https://reviews.bitcoinabc.org/D13328