Page MenuHomePhabricator

[alias-server] [p16] Update database on block
ClosedPublic

Authored by bytesofman on Feb 23 2023, 01:03.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABC8608168591a7: [alias-server] [p16] Update database on block
Summary

T2922

Depends on D13152

Add new main() function that is the actual node app. The app will check for new aliases every time a block is found and add to the database.

MVP functionality less API endpoints.

Test Plan

sudo systemctl mongod start
Run a Cashtab version capable of broadcasting alias txs
node index.js
Confirm alias functions and db write works correctly
Register some aliases at test address, confirm the app sees the txs
Wait for a block to be found
Confirm alias functions and db write works correctly

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emack requested changes to this revision.EditedFeb 24 2023, 05:40
emack added a subscriber: emack.

after registering fade.xec the server processed the new tx

image.png (200×1 px, 57 KB)

but after 1 confirmation on the tx it didn't update the insertedCount nor update the ecashalias db, which still sat on 131 total aliases

image.png (128×381 px, 8 KB)

until I stopped the script and rerun node index.js again

This revision now requires changes to proceed.Feb 24 2023, 05:40

Tracked in T2947

Will ignore in this diff and patch after we land the 17-parter

This revision is now accepted and ready to land.Feb 24 2023, 20:30