Page MenuHomePhabricator

[alias-server] Store pending alias txs in database, viewable at api endpoint
AbandonedPublic

Authored by bytesofman on Mar 20 2023, 21:24.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Summary

T3008

Depends on D13390

Parse incoming txs seen by the websocket to see whether or not they are valid alias txs. If they are, add them to a new database collection 'pendingAliases.' Make this collection viewable at the API endpoint /pending

Note: pending aliases are not checked against the full history of aliases. If they happen to be registered earlier, then we also want to block them from being registered as pending. No real harm in 'double counting' them this way. It's possible someone manually creates an alias registration tx that would be invalid once confirmed bc it is already taken, and this gets added to the pendingAliases table. NBD. After the block is found, such aliases will not be validAliases.

Test Plan

npm test and pass
node index.js
Register some a couple of aliases
Visit localhost:5000/pending and see them there

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 22771
Build 45162: Build Diff
Build 45161: arc lint + arc unit

Event Timeline

remove logging unrelated to this diff

This revision is now accepted and ready to land.Mar 28 2023, 23:39