Skip to content

Added endpoints with various statistics#4

Open
MatthewDLudwig wants to merge 6 commits intotomkha:masterfrom
MatthewDLudwig:master
Open

Added endpoints with various statistics#4
MatthewDLudwig wants to merge 6 commits intotomkha:masterfrom
MatthewDLudwig:master

Conversation

@MatthewDLudwig
Copy link

  • 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)
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.

1 participant