Commit Graph

22 Commits

Author SHA1 Message Date
Sebastian Grewe
0e27cda093 Fix: Blocks not being confirmed
Fixes an issue introduce with #610.
2013-08-26 11:11:52 +02:00
Sebastian Grewe
1c24820735 Adding network_confirmations to configuration
* Added new configuration option `$config['network_confirmations']` to
  dist config
* Default to 120 if not set

This will allow us to define a different confirmation level for user
transactions but still display blocks at their approriate unconfirmed
value when displaying them in the wallet information for admins. Risky
for pool owners but still a viable option.

Fixes #610
2013-08-22 11:45:40 +02:00
Sebastian Grewe
7e4c5dab4e Adding unconfirmed blocks to wallet
First attempt addressing #610, still missing a detection for the actual
confirmation limit required for each block in case one lowers it in the
config.
2013-08-19 09:31:53 +02:00
Sebastian Grewe
c94c1be7be Using proper SQL query by @CaptainAK
Proposed fix did not work, using proper Query now.
Thank @CaptainAK for the fix!

Fixes #492
2013-07-21 08:35:57 +02:00
Sebastian Grewe
440ca027a2 Fixing PPLNS target calculation on blockavg
This will fix #492 with PPLNS targets not taking the blocks in proper
order.
2013-07-21 08:12:40 +02:00
Sebastian Grewe
ba240000ab Latest version for PPLNS payouts
* Rebased with next to add logging functions
* Added block method to fetch specific block
* Modified getArchive shares method to be more constistent
* Added new global configuration
* Adjusted smarty globals with new configuration
* More verbose pplns cron with logging
* Re-target the round in case of PPLNS not being matched by archive

Fixes #143
2013-07-09 21:59:44 +02:00
Sebastian Grewe
2f2acdad6d First working version of PPLNS payouts
* Based PPLNS on Prop Payout script
* Using defaults from prop payout, no class adjustments
* Added more methods required for PPLNS
* Added block methods for dynamic payout calculations
* Added PPLNS Sidebar that also displays the PPLNS Target
 * Shares beyond this target will not be included in payouts
 * Shares missing to this target will be added from archives
* Enabled archiving by default for PPLNS
* Added configuration options for PPLNS
 * Documented the usage for PPLNS, defaults are sane
* Added pplns_payout to run-crons

Addresses #143 and if accepted will fix it
2013-07-09 21:59:44 +02:00
Sebastian Grewe
dc51d874a7 Adding block height to blockupdate output
This should make tracing block updates easier.
2013-07-09 21:26:06 +02:00
Sebastian Grewe
6dc795fd77 Improved cron logging via logfiles
* Added 3rd party logger library KLogger
* Adjusted all cronjobs from verbose output to logging
* Added new logs folder for crons to write to
* Added new .gitignore for logs folder data
* Updated blocks class to only fetch blocks with no share_id
* Adjusted findblocks to use no blocks class method
2013-07-07 22:04:43 +02:00
Sebastian Grewe
4691e077e2 Ensure no old blocks shares are counter for new ones
When finding more than a single block between runs it added shares to a
new block from a previous one. Properly fetch the last highest share ID
from the database prior to scanning for shares assigned to a block.

Fixes #124
2013-06-06 22:27:34 +02:00
Sebastian Grewe
a7bc6fc342 Changed backend logics for block finding and payout
* Findblocks cronjob changes
 * Find & Store upstream share
  * Use last found `share_id` as starting ID or `0`
 * Find & Store upstream finder
  * Use last found `share_id` as starting ID or `0`
* Use stored information when running propotional payout
 * Fetch current checked blocks upstream share from block table
 * Fetch previous upstream share of previous block from block table
 * Calculated payouts in that range of IDs
* Updated `block.class.php` to store share_id in block and fetch highest `share_id`
2013-05-31 14:23:29 +02:00
Sebastian Grewe
b5ab1a02fb Adding more in-line documentation and some cleanup 2013-05-30 09:55:21 +02:00
Sebastian Grewe
d44c236f2b Adding support for orphan blocks
* Adjusted blockupdate cronjob
 * Fetch block information via `gettransaction`
* Adjusted block class
 * Only getAllUnconfirmed where confirmations > -1
* Adjusted transaction class
 * added setOrphan method to mark orphaned transactions
* If block is orphaned
 * Mark all related transactions as Orphan_*type*
 * Set confirmations of block to -1 so it is ignored and marked as orphan
* Change transaction template, added listing for orphan transactions
* Add orphan status to block listings template
2013-05-27 14:44:40 +02:00
Sebastian Grewe
e791d27671 added getTableName method 2013-05-16 14:47:51 +02:00
Sebastian Grewe
ece3d8fd25 adding block statistics, added finder and round shares for blocks, updates transactions for new columns, updated template and pool statistics code 2013-05-13 09:21:41 +02:00
Sebastian Grewe
47ac213779 adding search method for unconfirmed blocks, add updateConfirmations method for blocks 2013-05-12 16:55:18 +02:00
Sebastian Grewe
365a91e407 ensure we only check for unaccounted blocks 2013-05-11 17:14:43 +02:00
Sebastian Grewe
a995ab640d Merge pull request #7 from TheSerapher/sharecounter-cron
Sharecounter cron
2013-05-11 00:15:58 -07:00
Sebastian Grewe
3971ea797c further work on sharecounter cron, almost all features available now 2013-05-11 09:15:19 +02:00
Sebastian Grewe
59c53a5d3d adding more output to findblocks 2013-05-11 08:00:35 +02:00
Sebastian Grewe
6486a72b1b allow searching blocks in reverse order for sharecounter 2013-05-10 22:36:27 +02:00
Sebastian Grewe
ef4b9fd21d adding new cronjob to find generated or immature blocks, changed project to allow scripts to run outside of webroot 2013-05-10 19:46:54 +02:00