Added endpoints with various statistics#4
Open
MatthewDLudwig wants to merge 6 commits intotomkha:masterfrom
Open
Added endpoints with various statistics#4MatthewDLudwig wants to merge 6 commits intotomkha:masterfrom
MatthewDLudwig wants to merge 6 commits intotomkha:masterfrom
Conversation
MatthewDLudwig
commented
Apr 9, 2020
- index.js changed to load PoolUIServer.js instead of PoolServer.js and to pass the pool host when constructing a PoolServer object.
- PoolServer.js changed to support child classes overriding how the httpsServer is created.
- PoolUIServer added which extends PoolServer.js and adds the new endpoints.
- index.js changed to load PoolUIServer.js instead of PoolServer.js and to pass the pool host when constructing a PoolServer object. - PoolServer.js changed to support child classes overriding how the httpsServer is created. - PoolUIServer added which extends PoolServer.js and adds the new endpoints.
- hashrateHistory for both pool and miner now include the latest block rather than the closest block divisible by 60. This just makes the last point on the graph slightly more accurate and is only really important for brand new pools trying to make sure the set up is working. - /api/miner/? was returning payout information using the minerTotalPayedOut query for totalPayedOut, totalEarned, and totalOwed. totalEarned and totalOwed are now using the correct queries for their info.
- Moved functions to Helper.js and configurable settings to Config.js - Improved accuracy of some endpoints by taking into account whether blocks are confirmed or not (has more than X confirmations where X is the payoutConfirmations config option)
- Helper.queryDB wasn't listed as a static function and therefore couldn't be called from PoolUIServer which needs it. - /api/pool/config endpoint now prints JSON prettily like all other endpoints.
- Original query was looking for all blocks with a datetime after the most recent payout's datetime, but this was an incorrect assumption and resulted in values that would be off by a few block rewards (payouts were still accurate, only endpoint was affected)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.