[alias-server] Only add aliases to db if blockheight is avalanche confirmed
Summary:
This is (almost) handled by only trying to update the server state if we have a blockheight that is avalanche confirmed. However, the chronik call to get tx history occurs after we have this avalanche confirmed block.
Possible edge case where
- Block comes in as avalanche confirmed
- Another block confirms before chronik call to get tx history
- Tx history is returned with some txs having a blockheight higher than the avalanche confirmed height of the server
In this case, we do not want to add any of these txs as valid alias registrations. They may indeed be valid, but they need to be picked up in the next loop processing an avalanche confirmed block.
Test Plan: npm test
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14321