Skip to content
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

Feat/rgbpp top holders #2384

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

rabbitz
Copy link
Collaborator

@rabbitz rabbitz commented Jan 2, 2025

No description provided.

@rabbitz rabbitz requested a review from zmcNotafraid January 2, 2025 13:10
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 0% with 39 lines in your changes missing coverage. Please review.

Project coverage is 55.13%. Comparing base (f373f6b) to head (297f714).
Report is 580 commits behind head on develop.

Files with missing lines Patch % Lines
...p/controllers/api/v2/rgb_top_holders_controller.rb 0.00% 38 Missing ⚠️
...rollers/api/v2/rgb_assets_statistics_controller.rb 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (f373f6b) and HEAD (297f714). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (f373f6b) HEAD (297f714)
2 1
Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #2384       +/-   ##
============================================
- Coverage    67.56%   55.13%   -12.43%     
============================================
  Files          289      375       +86     
  Lines         7944    10794     +2850     
============================================
+ Hits          5367     5951      +584     
- Misses        2577     4843     +2266     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

def btc_top_holders(udt)
result = BitcoinAddressMapping.
joins("LEFT OUTER JOIN udt_accounts ON udt_accounts.address_id = bitcoin_address_mappings.ckb_address_id").
where(udt_accounts: { udt_id: udt.id }).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are accounts with zero balance in this table? If so, append a filter amount > 0 could speed up this query

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are accounts with zero balance in this table? If so, append a filter amount > 0 could speed up this query

Added filter condition: where("udt_accounts.amount > 0")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants