-
Notifications
You must be signed in to change notification settings - Fork 123
Add utils module with script to display top address balances #819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/blockstack/stacks-blockchain-api/FfpnKvmVWWV4MQ8WukZfZfRcVx5y |
Codecov Report
@@ Coverage Diff @@
## develop #819 +/- ##
===========================================
+ Coverage 65.39% 67.82% +2.43%
===========================================
Files 90 90
Lines 9122 10121 +999
Branches 1459 1650 +191
===========================================
+ Hits 5965 6865 +900
- Misses 3152 3251 +99
Partials 5 5
Continue to review full report at Codecov.
|
01bf580
to
6521ab0
Compare
6521ab0
to
7d52457
Compare
Ready for review when you get a chance @zone117x , thanks 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super useful, thanks @rafaelcr!
Would be nice to have a mode that went through every address with a non-zero balance -- would take a long time but be helpful for a through sanity test. Could be done in a later PR if we want.
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
This PR adds a new
utils
module to the API that will allow us to write and use utility scripts to help us debug issues much faster.To start this module, a first script is added that displays the top N addresses that have the most STX transfer events in the
stx_events
table along with their reported balances both by the API database and a Stacks node. This function will help us debug block and microblock re-org bugs that cause balance discrepancies (such as #804).An example usage for this script is:
Type of Change
Does this introduce a breaking change?
No
Are documentation updates required?
No
Testing information
N/A
Checklist
npm run test
passes