Skip to content

Fix/pool/info: fix the /api/pool/info#102

Open
sethdivyansh wants to merge 2 commits into
dmnd-pool:masterfrom
sethdivyansh:fix/pool_stats
Open

Fix/pool/info: fix the /api/pool/info#102
sethdivyansh wants to merge 2 commits into
dmnd-pool:masterfrom
sethdivyansh:fix/pool_stats

Conversation

@sethdivyansh
Copy link
Copy Markdown

@sethdivyansh sethdivyansh commented Jun 26, 2025

Resolves: #101
image

@sethdivyansh
Copy link
Copy Markdown
Author

@Priceless-P Please review this PR.

@Priceless-P
Copy link
Copy Markdown
Collaborator

Priceless-P commented Jun 28, 2025

@sethdivyansh good catch
should be able to merge this when #90 is merged so that ci fixes will be checked. @jbesraa what do you think?

Copy link
Copy Markdown
Contributor

@jbesraa jbesraa left a comment

Choose a reason for hiding this comment

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

Thanks @sethdivyansh.
It feels redundant to me to get latency if we have a single address. Maybe the API endpoint should calculate latency rather than getting it from the router.

@sethdivyansh
Copy link
Copy Markdown
Author

Thanks @sethdivyansh. It feels redundant to me to get latency if we have a single address. Maybe the API endpoint should calculate latency rather than getting it from the router.

I have moved the latency calculation to the API side. it’s now only computed when the /api/pool/info endpoint is called, as it is in the dashboard I am building, where it’s triggered via polling.
Let me know if this aligns with what you expected.

@Priceless-P
Copy link
Copy Markdown
Collaborator

@jbesraa I understand that it feels redundant when there’s only a single address, but having the API endpoint calculate latency would actually introduce more redundancy. The endpoint would still need to call the router internally to get the latency, since that’s where the function resides. This would also generate unnecessary logs on the pool side because it would involve connecting to the pool just to retrieve the latency. I think It's more efficient to get the latency directly at the point of connection, as we're currently doing

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.

bug: /api/pool/info not returning pool information

3 participants